I have read the following spring documentation:
By default, the LocalValidatorFactoryBean configures a SpringConstraintValidatorFactory that uses Spring to create ConstraintValidator instances. This allows your custom ConstraintValidators to benefit from dependency injection like any other Spring bean.
I have wrote custom validator:
public class FieldMatchValidator implements ConstraintValidator<FieldMatch, Object>{
@Autowired
MyBeanDao dao;
...
}
But in debug I see that dao is null.
Please, explain I didn't understand documentation or I wrong configured something?