Skip to content

Commit 9d34283

Browse files
committed
Bump version to 5.0.0
1 parent 0dac56c commit 9d34283

3 files changed

Lines changed: 64 additions & 41 deletions

File tree

build.gradle

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = 'ee.bitweb'
8-
version = '5.0.0-RC1'
8+
version = '5.0.0'
99
java {
1010
sourceCompatibility = '17'
1111
}
@@ -24,43 +24,43 @@ repositories {
2424

2525
dependencies {
2626
// https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina
27-
compileOnly 'org.apache.tomcat:tomcat-catalina:11.0.12'
27+
compileOnly 'org.apache.tomcat:tomcat-catalina:11.0.21'
2828

2929
// https://mvnrepository.com/artifact/org.springframework/spring-webmvc
30-
compileOnly 'org.springframework:spring-webmvc:7.0.0'
30+
compileOnly 'org.springframework:spring-webmvc:7.0.7'
3131

3232
// https://mvnrepository.com/artifact/org.springframework/spring-tx
33-
compileOnly 'org.springframework:spring-tx:7.0.0'
33+
compileOnly 'org.springframework:spring-tx:7.0.7'
3434

3535
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security
36-
compileOnly 'org.springframework.boot:spring-boot-starter-security:4.0.0'
36+
compileOnly 'org.springframework.boot:spring-boot-starter-security:4.0.5'
3737

3838
// https://mvnrepository.com/artifact/org.springframework.amqp/spring-amqp
39-
compileOnly 'org.springframework.boot:spring-boot-starter-amqp:4.0.0'
39+
compileOnly 'org.springframework.boot:spring-boot-starter-amqp:4.0.5'
4040

4141
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor
42-
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:4.0.0'
42+
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:4.0.5'
4343

4444
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator
45-
compileOnly 'org.springframework.boot:spring-boot-starter-actuator:4.0.0'
45+
compileOnly 'org.springframework.boot:spring-boot-starter-actuator:4.0.5'
4646

4747
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-health (new in Spring Boot 4)
48-
compileOnly 'org.springframework.boot:spring-boot-health:4.0.0'
48+
compileOnly 'org.springframework.boot:spring-boot-health:4.0.5'
4949

5050
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure
51-
compileOnly 'org.springframework.boot:spring-boot-autoconfigure:4.0.0'
51+
compileOnly 'org.springframework.boot:spring-boot-autoconfigure:4.0.5'
5252

5353
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation
54-
compileOnly 'org.springframework.boot:spring-boot-starter-validation:4.0.0'
54+
compileOnly 'org.springframework.boot:spring-boot-starter-validation:4.0.5'
5555

5656
// Jackson 2.x - required for Retrofit converter-jackson (Retrofit doesn't support Jackson 3 yet)
57-
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.1'
57+
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.2'
5858

5959
// Jackson 3.x - required for Spring Boot 4 (ObjectMapper, ControllerAdvisor, Audit module)
60-
compileOnly 'tools.jackson.core:jackson-databind:3.0.2'
60+
compileOnly 'tools.jackson.core:jackson-databind:3.1.2'
6161

6262
// Spring Boot Jackson - provides JsonMapperBuilderCustomizer
63-
compileOnly 'org.springframework.boot:spring-boot-jackson:4.0.0'
63+
compileOnly 'org.springframework.boot:spring-boot-jackson:4.0.5'
6464

6565
// https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api
6666
compileOnly 'jakarta.validation:jakarta.validation-api:3.1.1'
@@ -78,19 +78,19 @@ dependencies {
7878
compileOnly 'de.siegmar:logback-gelf:6.1.2'
7979

8080
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
81-
testImplementation 'org.springframework.boot:spring-boot-starter-web:4.0.0'
81+
testImplementation 'org.springframework.boot:spring-boot-starter-web:4.0.5'
8282

8383
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test
84-
testImplementation 'org.springframework.boot:spring-boot-starter-test:4.0.0'
84+
testImplementation 'org.springframework.boot:spring-boot-starter-test:4.0.5'
8585

8686
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-webmvc-test (new in Spring Boot 4 for MockMvc testing)
87-
testImplementation 'org.springframework.boot:spring-boot-webmvc-test:4.0.0'
87+
testImplementation 'org.springframework.boot:spring-boot-webmvc-test:4.0.5'
8888

8989
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security
90-
testImplementation 'org.springframework.boot:spring-boot-starter-security:4.0.0'
90+
testImplementation 'org.springframework.boot:spring-boot-starter-security:4.0.5'
9191

9292
// https://mvnrepository.com/artifact/org.springframework.amqp/spring-amqp
93-
testImplementation 'org.springframework.boot:spring-boot-starter-amqp:4.0.0'
93+
testImplementation 'org.springframework.boot:spring-boot-starter-amqp:4.0.5'
9494

9595
// https://mvnrepository.com/artifact/org.json/json
9696
testImplementation 'org.json:json:20251224'
@@ -99,18 +99,18 @@ dependencies {
9999
testImplementation 'ee.bitweb:spring-test-core:2.0.1'
100100

101101
// https://mvnrepository.com/artifact/org.mockito/mockito-core
102-
testImplementation 'org.mockito:mockito-core:5.21.0'
102+
testImplementation 'org.mockito:mockito-core:5.23.0'
103103

104104
// https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter
105-
testImplementation 'org.mockito:mockito-junit-jupiter:5.21.0'
105+
testImplementation 'org.mockito:mockito-junit-jupiter:5.23.0'
106106

107107
// https://mvnrepository.com/artifact/org.mock-server/mockserver-netty
108108
testImplementation('org.mock-server:mockserver-netty:5.15.0') {
109109
exclude group: 'junit', module: 'junit'
110110
}
111111

112112
// https://mvnrepository.com/artifact/org.testcontainers/testcontainers
113-
testImplementation 'org.testcontainers:testcontainers:2.0.3'
113+
testImplementation 'org.testcontainers:testcontainers:2.0.4'
114114

115115
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
116116
}

src/main/java/ee/bitweb/core/object_mapper/ObjectMapperAutoConfiguration.java

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import lombok.RequiredArgsConstructor;
99
import lombok.extern.slf4j.Slf4j;
1010
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
11+
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
12+
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
1113
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
1214
import org.springframework.boot.context.properties.EnableConfigurationProperties;
1315
import org.springframework.boot.jackson.autoconfigure.JsonMapperBuilderCustomizer;
@@ -16,6 +18,8 @@
1618
import tools.jackson.databind.DeserializationFeature;
1719
import tools.jackson.databind.cfg.DateTimeFeature;
1820

21+
import static com.fasterxml.jackson.databind.DeserializationFeature.*;
22+
1923
/**
2024
* Auto-configuration for ObjectMapper (Jackson 2) and JsonMapper (Jackson 3).
2125
*
@@ -50,8 +54,30 @@ public JsonMapperBuilderCustomizer coreLibJsonMapperCustomizer() {
5054
}
5155

5256
/**
53-
* Jackson 2 ObjectMapper customizer for Retrofit compatibility.
54-
* Configures the ObjectMapper bean with the same behavior as JsonMapper.
57+
* Creates a Jackson 2 ObjectMapper bean when none exists and Jackson 2 is on the classpath.
58+
*/
59+
@Slf4j
60+
@Configuration
61+
@ConditionalOnClass(ObjectMapper.class)
62+
@ConditionalOnMissingBean(ObjectMapper.class)
63+
static class Jackson2ObjectMapperCreator {
64+
65+
@Bean
66+
public ObjectMapper objectMapper() {
67+
log.info("Creating Core Library ObjectMapper (Jackson 2) bean");
68+
69+
ObjectMapper objectMapper = new ObjectMapper();
70+
Jackson2TrimmedStringDeserializer.addToObjectMapper(objectMapper);
71+
objectMapper.registerModule(new JavaTimeModule());
72+
objectMapper.disable(ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
73+
objectMapper.disable(ACCEPT_FLOAT_AS_INT);
74+
75+
return objectMapper;
76+
}
77+
}
78+
79+
/**
80+
* Customizes an existing Jackson 2 ObjectMapper bean with core library defaults.
5581
*/
5682
@Slf4j
5783
@Configuration
@@ -67,8 +93,8 @@ public void customize() {
6793

6894
Jackson2TrimmedStringDeserializer.addToObjectMapper(objectMapper);
6995
objectMapper.registerModule(new JavaTimeModule());
70-
objectMapper.disable(com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
71-
objectMapper.disable(com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_FLOAT_AS_INT);
96+
objectMapper.disable(ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
97+
objectMapper.disable(ACCEPT_FLOAT_AS_INT);
7298
}
7399
}
74100
}

src/test/java/ee/bitweb/core/TestSpringApplication.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
package ee.bitweb.core;
22

3-
import tools.jackson.databind.json.JsonMapper;
3+
import com.fasterxml.jackson.databind.ObjectMapper;
44
import ee.bitweb.core.trace.creator.TraceIdCreator;
55
import org.springframework.boot.SpringApplication;
6-
import org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest;
76
import org.springframework.boot.autoconfigure.SpringBootApplication;
87
import org.springframework.boot.context.properties.EnableConfigurationProperties;
8+
import org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest;
99
import org.springframework.context.annotation.Bean;
10+
import org.springframework.context.annotation.Configuration;
1011
import org.springframework.context.annotation.Profile;
1112
import org.springframework.security.config.Customizer;
1213
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
1314
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
1415
import org.springframework.security.web.SecurityFilterChain;
1516
import org.springframework.security.web.util.matcher.NegatedRequestMatcher;
1617
import org.springframework.util.StringUtils;
18+
import tools.jackson.databind.DeserializationFeature;
19+
import tools.jackson.databind.json.JsonMapper;
1720

1821
@SpringBootApplication
1922
@EnableConfigurationProperties
@@ -23,25 +26,19 @@ public static void main(String[] args) {
2326
SpringApplication.run(TestSpringApplication.class);
2427
}
2528

26-
@org.springframework.context.annotation.Configuration
27-
public static class Configuration {
29+
@Configuration
30+
public static class JacksonConfiguration {
2831

2932
@Bean
30-
public tools.jackson.databind.ObjectMapper jackson3ObjectMapper() {
31-
// Jackson 3.x for Spring Boot 4's internal use
33+
public JsonMapper jackson3ObjectMapper() {
3234
return JsonMapper.builder()
33-
.disable(tools.jackson.databind.DeserializationFeature.ACCEPT_FLOAT_AS_INT)
35+
.disable(DeserializationFeature.ACCEPT_FLOAT_AS_INT)
3436
.build();
3537
}
3638

3739
@Bean
38-
public com.fasterxml.jackson.databind.ObjectMapper objectMapper() {
39-
// Jackson 2.x for test compatibility
40-
com.fasterxml.jackson.databind.ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper();
41-
mapper.registerModule(new com.fasterxml.jackson.datatype.jsr310.JavaTimeModule());
42-
mapper.disable(com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
43-
mapper.disable(com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_FLOAT_AS_INT);
44-
return mapper;
40+
public ObjectMapper objectMapper() {
41+
return new ObjectMapper();
4542
}
4643

4744
@Bean("InvokerTraceIdCreator")
@@ -59,7 +56,7 @@ public String generate(String traceId) {
5956
}
6057
}
6158

62-
@org.springframework.context.annotation.Configuration
59+
@Configuration
6360
public static class SecurityConfiguration {
6461

6562
@Bean

0 commit comments

Comments
 (0)