File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed
src/main/java/io/avaje/http/hibernate/validator Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 44
55 <groupId >io.avaje</groupId >
66 <artifactId >avaje-http-hibernate-validator</artifactId >
7- <version >2.0 </version >
7+ <version >2.5 </version >
88
99 <parent >
1010 <groupId >org.avaje</groupId >
1111 <artifactId >java8-oss</artifactId >
12- <version >2.3 </version >
12+ <version >3.1 </version >
1313 </parent >
1414
1515 <scm >
2222 <dependency >
2323 <groupId >org.hibernate.validator</groupId >
2424 <artifactId >hibernate-validator</artifactId >
25- <version >6.1 .0.Final</version >
25+ <version >6.2 .0.Final</version >
2626 </dependency >
2727
2828 <dependency >
2929 <groupId >org.glassfish</groupId >
3030 <artifactId >javax.el</artifactId >
31- <version >3.0.1-b09 </version >
31+ <version >3.0.1-b12 </version >
3232 </dependency >
3333
3434 <dependency >
3535 <groupId >io.avaje</groupId >
3636 <artifactId >avaje-http-api</artifactId >
37- <version >1.2 </version >
37+ <version >1.4 </version >
3838 <scope >provided</scope >
3939 </dependency >
4040
4141 <dependency >
4242 <groupId >io.avaje</groupId >
4343 <artifactId >avaje-inject</artifactId >
44- <version >4.0 </version >
44+ <version >6.0.RC4 </version >
4545 <scope >provided</scope >
4646 </dependency >
4747
5050 <dependency >
5151 <groupId >io.avaje</groupId >
5252 <artifactId >avaje-inject-generator</artifactId >
53- <version >4.0 </version >
53+ <version >6.0.RC4 </version >
5454 <scope >provided</scope >
5555 </dependency >
5656
Original file line number Diff line number Diff line change 55import io .avaje .http .api .Validator ;
66
77import jakarta .inject .Singleton ;
8+
89import javax .validation .ConstraintViolation ;
910import javax .validation .Path ;
1011import javax .validation .Validation ;
@@ -20,17 +21,14 @@ public class BeanValidator implements Validator {
2021
2122 @ Override
2223 public void validate (Object bean ) {
23-
2424 Set <ConstraintViolation <Object >> violations = factory .getValidator ().validate (bean );
2525 if (!violations .isEmpty ()) {
2626 throwExceptionWith (violations );
2727 }
2828 }
2929
3030 private void throwExceptionWith (Set <ConstraintViolation <Object >> violations ) {
31-
32- Map <String ,Object > errors = new LinkedHashMap <>();
33-
31+ Map <String , Object > errors = new LinkedHashMap <>();
3432 for (ConstraintViolation <?> violation : violations ) {
3533 Path path = violation .getPropertyPath ();
3634 String message = violation .getMessage ();
Original file line number Diff line number Diff line change 1- @ ContextModule (name = "javalin -validator" , provides = "validator" )
1+ @ InjectModule (name = "bean -validator" , provides = "validator" )
22package io .avaje .http .hibernate .validator ;
33
4- import io .avaje .inject .ContextModule ;
4+ import io .avaje .inject .InjectModule ;
You can’t perform that action at this time.
0 commit comments