Commit 4fa38aeb authored by Phillip Webb's avatar Phillip Webb

Consider hierarchy when searching for @Validated

Update `ConfigurationPropertiesBindingPostProcessor` to use a more
exhaustive hierarchy search when checking for `@Validated`.

Fixes gh-8150
parent 21234b36
......@@ -417,7 +417,7 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
if (!super.supports(type)) {
return false;
}
if (AnnotatedElementUtils.isAnnotated(type, Validated.class)) {
if (AnnotatedElementUtils.hasAnnotation(type, Validated.class)) {
return true;
}
if (type.getPackage().getName().startsWith("org.springframework.boot")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment