mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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
This commit is contained in:
parent
f18521913c
commit
054ce2865c
@ -84,7 +84,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
|
||||
public static final String VALIDATOR_BEAN_NAME = "configurationPropertiesValidator";
|
||||
|
||||
private static final String[] VALIDATOR_CLASSES = { "javax.validation.Validator",
|
||||
"javax.validation.ValidatorFactory" };
|
||||
"javax.validation.ValidatorFactory",
|
||||
"javax.validation.bootstrap.GenericBootstrap" };
|
||||
|
||||
private static final Log logger = LogFactory
|
||||
.getLog(ConfigurationPropertiesBindingPostProcessor.class);
|
||||
|
Loading…
Reference in New Issue
Block a user