Refine BeanValidationBeanRegistrationAotProcessor logging
This commit prints a log message at debug level without a stacktrace for TypeNotPresentException and uses warn level instead of error level for other exceptions since the processing of such bean will just be skipped. Closes gh-31147
This commit is contained in:
@@ -105,8 +105,12 @@ class BeanValidationBeanRegistrationAotProcessor implements BeanRegistrationAotP
|
||||
logger.warn("Skipping validation constraint hint inference for bean " + registeredBean.getBeanName() +
|
||||
" due to an ArrayIndexOutOfBoundsException at validator level");
|
||||
}
|
||||
else if (ex instanceof TypeNotPresentException) {
|
||||
logger.debug("Skipping validation constraint hint inference for bean " +
|
||||
registeredBean.getBeanName() + " due to a TypeNotPresentException at validator level: " + ex.getMessage());
|
||||
}
|
||||
else {
|
||||
logger.error("Skipping validation constraint hint inference for bean " +
|
||||
logger.warn("Skipping validation constraint hint inference for bean " +
|
||||
registeredBean.getBeanName(), ex);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user