Skip to content

Commit 054ce28

Browse files
committed
Protect against partial visibility of Bean Validation API
On WebSphere Liberty, the javax.validation package may be visible but other javax.validation packages upon which it depends may not be visible. This can lead to an incorrect assumption that the Bean Validation API is available when, in fact, it is only partially available. Add an additional check for the availability of a class in the javax.validation.bootstrap package to ensure that it's not just the javax.validation package that's available. Closes gh-10877
1 parent f185219 commit 054ce28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
8484
public static final String VALIDATOR_BEAN_NAME = "configurationPropertiesValidator";
8585

8686
private static final String[] VALIDATOR_CLASSES = { "javax.validation.Validator",
87-
"javax.validation.ValidatorFactory" };
87+
"javax.validation.ValidatorFactory",
88+
"javax.validation.bootstrap.GenericBootstrap" };
8889

8990
private static final Log logger = LogFactory
9091
.getLog(ConfigurationPropertiesBindingPostProcessor.class);

0 commit comments

Comments
 (0)