getting @Autowired fields to work with ConstraintValidators in spring boot
1 min readDec 14, 2017
While working on a class that implements ConstraintValidator, I needed to @Autowire a field, but it kept being null. The following made it work:
While working on a class that implements ConstraintValidator, I needed to @Autowire a field, but it kept being null. The following made it work: