Skip to content

Commit 0bd1817

Browse files
Updated Spring boot version to 3.2.0 and added separate maven profile to publish artefacts
1 parent 8acfc1e commit 0bd1817

File tree

2 files changed

+103
-92
lines changed

2 files changed

+103
-92
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**A Generic library for handling exceptions in Spring Boot applications**,
44
implementing specification [**`Problem Details (RFC7807) for HTTP APIs`**](https://datatracker.ietf.org/doc/html/rfc7807).
5-
Requires Java 17+, Spring boot 3+ and Jakarta EE 10
5+
Requires Java 21, Spring boot 3+ and Jakarta EE 10
66

77
![Exception Handling](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*0s2E6-iNFqr_xptwrmJTdg.jpeg)
88

@@ -25,24 +25,23 @@ all can be done with zero custom code but by specifying error details in `proper
2525

2626
## Installation
2727

28-
> **Current version: 1.5** Refer to [Release notes](https://github.com/officiallysingh/spring-boot-problem-handler/releases/tag/1.5) while upgrading
28+
> **Current version: 1.6** Refer to [Release notes](https://github.com/officiallysingh/spring-boot-problem-handler/releases/tag/1.5) while upgrading
2929
3030
Add the `spring-boot-problem-handler` jar to application dependencies. That is all it takes to get a default working
3131
exception handling mechanism in a Spring boot application.
3232

33-
```xml
34-
<properties>
35-
<spring-boot-problem-handler.version>1.5</spring-boot-problem-handler.version>
36-
</properties>
37-
```
38-
33+
Maven
3934
```xml
4035
<dependency>
4136
<groupId>io.github.officiallysingh</groupId>
4237
<artifactId>spring-boot-problem-handler</artifactId>
43-
<version>${spring-boot-problem-handler.version}</version>
38+
<version>1.6</version>
4439
</dependency>
4540
```
41+
Gradle
42+
```groovy
43+
implementation 'io.github.officiallysingh:spring-boot-problem-handler:1.5'
44+
```
4645

4746
It does all hard part, A lot of advices are out of box available which are autoconfigured as `ControllerAdvice`s
4847
depending on the jars in classpath of consumer application.
@@ -805,7 +804,7 @@ The autoconfiguration may not take effect while running Junit test cases, So req
805804

806805
> For Spring Web applications
807806
```java
808-
@Configuration
807+
@TestConfiguration
809808
@ImportAutoConfiguration(
810809
classes = {
811810
ProblemBeanRegistry.class,
@@ -843,7 +842,7 @@ class StateControllerTest {
843842

844843
> Similarly for Spring Webflux applications, import following configuration class `@ImportAutoConfiguration(classes = {WebFluxTestConfiguration.class})` in `Controller`s test cases
845844
```java
846-
@Configuration
845+
@TestConfiguration
847846
@ImportAutoConfiguration(
848847
classes = {
849848
ProblemBeanRegistry.class,

pom.xml

Lines changed: 93 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.officiallysingh</groupId>
88
<artifactId>spring-boot-problem-handler</artifactId>
9-
<version>1.5</version>
9+
<version>1.6</version>
1010
<name>spring-boot-problem-handler</name>
1111
<description>Commons exception handler library</description>
1212
<url>https://github.com/officiallysingh/spring-boot-problem-handler</url>
@@ -31,14 +31,14 @@
3131
</developers>
3232

3333
<properties>
34-
<java.version>17</java.version>
35-
<spring-boot.version>3.1.4</spring-boot.version>
34+
<java.version>21</java.version>
35+
<spring-boot.version>3.2.0</spring-boot.version>
3636
<spring-cloud.version>2022.0.4</spring-cloud.version>
3737
<jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
3838
<jakarta.annotation-api.version>2.1.1</jakarta.annotation-api.version>
39-
<swagger-request-validator-spring-webmvc.version>2.34.1</swagger-request-validator-spring-webmvc.version>
39+
<swagger-request-validator-spring-webmvc.version>2.39.0</swagger-request-validator-spring-webmvc.version>
4040
<commons-collections4.version>4.4</commons-collections4.version>
41-
<guava.version>32.1.2-jre</guava.version>
41+
<guava.version>32.1.3-jre</guava.version>
4242
<failsafe.version>2.4.4</failsafe.version>
4343

4444
<scm.connection>scm:git:git@github.com:officiallysingh/spring-boot-problem-handler.git</scm.connection>
@@ -158,17 +158,6 @@
158158
<developerConnection>${scm.connection}</developerConnection>
159159
</scm>
160160

161-
<distributionManagement>
162-
<snapshotRepository>
163-
<id>ossrh</id>
164-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
165-
</snapshotRepository>
166-
<repository>
167-
<id>ossrh</id>
168-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
169-
</repository>
170-
</distributionManagement>
171-
172161
<build>
173162
<plugins>
174163
<!-- Auto format code during compilation -->
@@ -206,72 +195,95 @@
206195
<!-- </execution>-->
207196
<!-- </executions>-->
208197
<!-- </plugin>-->
209-
210-
<plugin>
211-
<groupId>org.apache.maven.plugins</groupId>
212-
<artifactId>maven-release-plugin</artifactId>
213-
<version>${maven-release-plugin.version}</version>
214-
</plugin>
215-
<plugin>
216-
<groupId>org.apache.maven.plugins</groupId>
217-
<artifactId>maven-deploy-plugin</artifactId>
218-
<version>${maven-deploy-plugin.version}</version>
219-
</plugin>
220-
<plugin>
221-
<groupId>org.apache.maven.plugins</groupId>
222-
<artifactId>maven-source-plugin</artifactId>
223-
<version>${maven-source-plugin.version}</version>
224-
<executions>
225-
<execution>
226-
<id>attach-sources</id>
227-
<goals>
228-
<goal>jar-no-fork</goal>
229-
</goals>
230-
</execution>
231-
</executions>
232-
</plugin>
233-
<plugin>
234-
<groupId>org.apache.maven.plugins</groupId>
235-
<artifactId>maven-javadoc-plugin</artifactId>
236-
<version>${maven-javadoc-plugin.version}</version>
237-
<executions>
238-
<execution>
239-
<id>attach-javadocs</id>
240-
<goals>
241-
<goal>jar</goal>
242-
</goals>
243-
</execution>
244-
</executions>
245-
<configuration>
246-
<source>${maven.compiler.source}</source>
247-
</configuration>
248-
</plugin>
249-
<plugin>
250-
<groupId>org.apache.maven.plugins</groupId>
251-
<artifactId>maven-gpg-plugin</artifactId>
252-
<version>${maven-gpg-plugin.version}</version>
253-
<executions>
254-
<execution>
255-
<id>sign-artifacts</id>
256-
<phase>verify</phase>
257-
<goals>
258-
<goal>sign</goal>
259-
</goals>
260-
</execution>
261-
</executions>
262-
</plugin>
263-
<plugin>
264-
<groupId>org.sonatype.plugins</groupId>
265-
<artifactId>nexus-staging-maven-plugin</artifactId>
266-
<version>${nexus-staging-maven-plugin.version}</version>
267-
<extensions>true</extensions>
268-
<configuration>
269-
<serverId>ossrh</serverId>
270-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
271-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
272-
</configuration>
273-
</plugin>
274198
</plugins>
275199
</build>
276200

201+
<profiles>
202+
<profile>
203+
<id>publish-artefacts</id>
204+
<activation>
205+
<activeByDefault>false</activeByDefault>
206+
</activation>
207+
208+
<distributionManagement>
209+
<snapshotRepository>
210+
<id>ossrh</id>
211+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
212+
</snapshotRepository>
213+
<repository>
214+
<id>ossrh</id>
215+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
216+
</repository>
217+
</distributionManagement>
218+
219+
<build>
220+
<plugins>
221+
<plugin>
222+
<groupId>org.apache.maven.plugins</groupId>
223+
<artifactId>maven-release-plugin</artifactId>
224+
<version>${maven-release-plugin.version}</version>
225+
</plugin>
226+
<plugin>
227+
<groupId>org.apache.maven.plugins</groupId>
228+
<artifactId>maven-deploy-plugin</artifactId>
229+
<version>${maven-deploy-plugin.version}</version>
230+
</plugin>
231+
<plugin>
232+
<groupId>org.apache.maven.plugins</groupId>
233+
<artifactId>maven-source-plugin</artifactId>
234+
<version>${maven-source-plugin.version}</version>
235+
<executions>
236+
<execution>
237+
<id>attach-sources</id>
238+
<goals>
239+
<goal>jar-no-fork</goal>
240+
</goals>
241+
</execution>
242+
</executions>
243+
</plugin>
244+
<plugin>
245+
<groupId>org.apache.maven.plugins</groupId>
246+
<artifactId>maven-javadoc-plugin</artifactId>
247+
<version>${maven-javadoc-plugin.version}</version>
248+
<executions>
249+
<execution>
250+
<id>attach-javadocs</id>
251+
<goals>
252+
<goal>jar</goal>
253+
</goals>
254+
</execution>
255+
</executions>
256+
<configuration>
257+
<source>${maven.compiler.source}</source>
258+
</configuration>
259+
</plugin>
260+
<plugin>
261+
<groupId>org.apache.maven.plugins</groupId>
262+
<artifactId>maven-gpg-plugin</artifactId>
263+
<version>${maven-gpg-plugin.version}</version>
264+
<executions>
265+
<execution>
266+
<id>sign-artifacts</id>
267+
<phase>verify</phase>
268+
<goals>
269+
<goal>sign</goal>
270+
</goals>
271+
</execution>
272+
</executions>
273+
</plugin>
274+
<plugin>
275+
<groupId>org.sonatype.plugins</groupId>
276+
<artifactId>nexus-staging-maven-plugin</artifactId>
277+
<version>${nexus-staging-maven-plugin.version}</version>
278+
<extensions>true</extensions>
279+
<configuration>
280+
<serverId>ossrh</serverId>
281+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
282+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
283+
</configuration>
284+
</plugin>
285+
</plugins>
286+
</build>
287+
</profile>
288+
</profiles>
277289
</project>

0 commit comments

Comments
 (0)