Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
88 views

Question I'm using Hibernate Validator 8 with Spring Boot 3 and trying to use addExpressionVariable() to safely pass error codes in custom constraint violations. However, the expression #{expMessage} ...
Uday Chauhan's user avatar
  • 1,158
0 votes
0 answers
99 views

I’m building an API with Spring Boot + Kotlin and I have a scenario where a GET endpoint receives several query parameters. Instead of declaring many @RequestParam in the controller, I’d like to group ...
victor hugo's user avatar
2 votes
1 answer
201 views

In my project Spring Boot 3.3.x with Hibernate Validator 8.x and the validation of element list doesn't work. Tell me why? import jakarta.validation.Valid import jakarta.validation.Validation import ...
Kim Vladimir's user avatar
0 votes
1 answer
57 views

I'm trying to limit the scope of a bean (@Component) in my application with no result. I always get this error: "No qualifying bean of type 'com.aexp.mars.egress.gateway.publisher....
Perugini's user avatar
1 vote
1 answer
88 views

I can't find it explicitly stated in any of the documentation for JSR303/JSR380 bean validation (Jakarta Validation), but do all fields to which you apply validations have to be "essentially"...
JackLThornton's user avatar
0 votes
0 answers
38 views

My controller looks something like this; @PostMapping(path = RequestMappingConstants.CALCULATE_INTEREST, consumes = MediaType.APPLICATION_JSON_VALUE) private ResponseEntity<Response> execute(@...
ThivankaW's user avatar
  • 540
0 votes
1 answer
670 views

This is my Global Exception Handler class: package com.example.demo.application.handlers; import java.util.HashMap; import java.util.Map; import org.springframework.http.HttpStatus; import org....
Samuel Maciel's user avatar
0 votes
1 answer
98 views

I have a stateless Java EE 7 WebService and want to use the validation framework to validate the incoming data. This all works fine. I then want to transform any ConstraintViolationException to ...
Alan Hay's user avatar
  • 23.3k
0 votes
0 answers
154 views

I have a custom validation annotation that verifies a fiscal code. FiscalCode.java @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER, ElementType.FIELD}) @Constraint(validatedBy = ...
Etraz's user avatar
  • 55
3 votes
2 answers
274 views

How can I validate a collection is empty? // should be empty! @JsonbTransient @JsonIgnore @XmlAnyAttribute private Map<QName, Object> unknownAttributes; // should be ...
Jin Kwon's user avatar
  • 22.5k
0 votes
1 answer
472 views

I am trying to perform custom object validation programmatically using Validator interface. Here is a simple example, Model Class (Record) public record Product(String name, int price) implements ...
Vijay Kumar's user avatar
1 vote
1 answer
516 views

I'm using the popular Jakarta bean validation API v3.0.2 + Hibernate Validator. I'm having a lot of trouble debugging validation errors because beans I'm validating have a lot of fields, and the error ...
Kevin's user avatar
  • 2,001
0 votes
1 answer
65 views

Please refer to the below controller code:- @GetMapping("/fetch) void fetchData( @RequestParam @Pattern(regexp="(^$|[0-9]{10})",message = "Mobile number must be ...
Chris's user avatar
  • 89
0 votes
1 answer
55 views

I have class with lots of fields, each with a getter and setter. We now need to add logging to some of these methods so I added the new logger-field: @JsonIgnoreProperties(ignoreUnknown = true) public ...
Mikhail T.'s user avatar
  • 4,362
1 vote
1 answer
383 views

Wondering why Spring is not getting the Hibernate Bean Validation kicked in. According to the documentation HERE, it requires a MethodValidationPostProcessor in the context and the target spring bean ...
Commander's user avatar

15 30 50 per page
1
2 3 4 5
129