Class BeanValidationPostProcessor

    • Method Detail

      • setValidator

        public void setValidator​(Validator validator)
        Set the JSR-303 Validator to delegate to for validating beans.

        Default is the default ValidatorFactory's default Validator.

      • setAfterInitialization

        public void setAfterInitialization​(boolean afterInitialization)
        Choose whether to perform validation after bean initialization (i.e. after init methods) instead of before (which is the default).

        Default is "false" (before initialization). Switch this to "true" (after initialization) if you would like to give init methods a chance to populate constrained fields before they get validated.

      • afterPropertiesSet

        public void afterPropertiesSet()
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean