Skip to content

Commit b6f23fe

Browse files
authored
Merge pull request #354 from xdev-software/develop
Release
2 parents 25d9f23 + 72558db commit b6f23fe

43 files changed

Lines changed: 1116 additions & 60 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.5.0
2+
* New module `caching-validation-provider`
3+
14
# 2.4.0
25
* oauth2-oidc-remember-me
36
* Prefer use of UTC based `Instant` instead of `LocalDateTime`

bom/pom.xml

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

77
<groupId>software.xdev.sse</groupId>
88
<artifactId>bom</artifactId>
9-
<version>2.4.1-SNAPSHOT</version>
9+
<version>2.5.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<name>bom</name>
@@ -48,65 +48,70 @@
4848

4949
<dependencyManagement>
5050
<dependencies>
51+
<dependency>
52+
<groupId>software.xdev.sse</groupId>
53+
<artifactId>caching-validation-provider</artifactId>
54+
<version>2.5.0-SNAPSHOT</version>
55+
</dependency>
5156
<dependency>
5257
<groupId>software.xdev.sse</groupId>
5358
<artifactId>client-storage</artifactId>
54-
<version>2.4.1-SNAPSHOT</version>
59+
<version>2.5.0-SNAPSHOT</version>
5560
</dependency>
5661
<dependency>
5762
<groupId>software.xdev.sse</groupId>
5863
<artifactId>crypto-symmetric</artifactId>
59-
<version>2.4.1-SNAPSHOT</version>
64+
<version>2.5.0-SNAPSHOT</version>
6065
</dependency>
6166
<dependency>
6267
<groupId>software.xdev.sse</groupId>
6368
<artifactId>crypto-symmetric-managed</artifactId>
64-
<version>2.4.1-SNAPSHOT</version>
69+
<version>2.5.0-SNAPSHOT</version>
6570
</dependency>
6671
<dependency>
6772
<groupId>software.xdev.sse</groupId>
6873
<artifactId>codec-sha256</artifactId>
69-
<version>2.4.1-SNAPSHOT</version>
74+
<version>2.5.0-SNAPSHOT</version>
7075
</dependency>
7176
<dependency>
7277
<groupId>software.xdev.sse</groupId>
7378
<artifactId>csp</artifactId>
74-
<version>2.4.1-SNAPSHOT</version>
79+
<version>2.5.0-SNAPSHOT</version>
7580
</dependency>
7681
<dependency>
7782
<groupId>software.xdev.sse</groupId>
7883
<artifactId>metrics</artifactId>
79-
<version>2.4.1-SNAPSHOT</version>
84+
<version>2.5.0-SNAPSHOT</version>
8085
</dependency>
8186
<dependency>
8287
<groupId>software.xdev.sse</groupId>
8388
<artifactId>oauth2-oidc</artifactId>
84-
<version>2.4.1-SNAPSHOT</version>
89+
<version>2.5.0-SNAPSHOT</version>
8590
</dependency>
8691
<dependency>
8792
<groupId>software.xdev.sse</groupId>
8893
<artifactId>oauth2-oidc-remember-me</artifactId>
89-
<version>2.4.1-SNAPSHOT</version>
94+
<version>2.5.0-SNAPSHOT</version>
9095
</dependency>
9196
<dependency>
9297
<groupId>software.xdev.sse</groupId>
9398
<artifactId>vaadin</artifactId>
94-
<version>2.4.1-SNAPSHOT</version>
99+
<version>2.5.0-SNAPSHOT</version>
95100
</dependency>
96101
<dependency>
97102
<groupId>software.xdev.sse</groupId>
98103
<artifactId>web</artifactId>
99-
<version>2.4.1-SNAPSHOT</version>
104+
<version>2.5.0-SNAPSHOT</version>
100105
</dependency>
101106
<dependency>
102107
<groupId>software.xdev.sse</groupId>
103108
<artifactId>web-sidecar-actuator</artifactId>
104-
<version>2.4.1-SNAPSHOT</version>
109+
<version>2.5.0-SNAPSHOT</version>
105110
</dependency>
106111
<dependency>
107112
<groupId>software.xdev.sse</groupId>
108113
<artifactId>web-sidecar-common</artifactId>
109-
<version>2.4.1-SNAPSHOT</version>
114+
<version>2.5.0-SNAPSHOT</version>
110115
</dependency>
111116
</dependencies>
112117
</dependencyManagement>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Caching Validation Provider
2+
3+
Utility to reduce instantiation of Validators.
4+
5+
The underlying problem can be observed when enabling `DEBUG` logging for `org.hibernate.validator` and was described in [spring-projects/spring-boot#50597](https://github.com/spring-projects/spring-boot/issues/50597).
6+
The Validator(Factory) get's instantiated a lot:
7+
1. By `JakartaValidationBackgroundPreinitializer`
8+
2. By Hibernate itself when `spring.jpa.properties.jakarta.persistence.validation.mode` is NOT set to `none`
9+
3. For every `@Validated` annotation in `ConfigurationPropertiesBinder` (in SSE this can happen up to 8 times)
10+
4. As `defaultValidator` in `LocalValidatorFactoryBean`
11+
12+
The problem is worked around by:
13+
* Caching ValidatorFactories for identical configurations
14+
* Wrapping configuration in a comparable object so that it can be determined if it's identical or not
15+
* Disabling XML configuration by default (can be re-enabled by setting system property `validation.xml-configuration.enable=true`)
16+
17+
NOTE: The code here is not directly related to SSE (it hooks itself into `jakarta.validation.spi.ValidationProvider` to patch the observed problems) but it - for now - lives here because SSE is heavily affected by it.

0 commit comments

Comments
 (0)