ValidationExceptionFailureAnalyzer Class — spring-boot Architecture
Architecture documentation for the ValidationExceptionFailureAnalyzer class in ValidationExceptionFailureAnalyzer.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/ValidationExceptionFailureAnalyzer.java lines 33–56
class ValidationExceptionFailureAnalyzer extends AbstractFailureAnalyzer<ValidationException> {
private static final String JAVAX_MISSING_IMPLEMENTATION_MESSAGE = "Unable to create a "
+ "Configuration, because no Bean Validation provider could be found";
private static final String JAKARTA_MISSING_IMPLEMENTATION_MESSAGE = "Unable to create a "
+ "Configuration, because no Jakarta Bean Validation provider could be found";
@Override
protected @Nullable FailureAnalysis analyze(Throwable rootFailure, ValidationException cause) {
String message = cause.getMessage();
if (message == null) {
message = "";
}
if (cause instanceof NoProviderFoundException || message.startsWith(JAVAX_MISSING_IMPLEMENTATION_MESSAGE)
|| message.startsWith(JAKARTA_MISSING_IMPLEMENTATION_MESSAGE)) {
return new FailureAnalysis(
"The Bean Validation API is on the classpath but no implementation could be found",
"Add an implementation, such as Hibernate Validator, to the classpath", cause);
}
return null;
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free