类 BeanValidationPostProcessor

    • 方法详细资料

      • 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()
        从接口复制的说明: 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.

        指定者:
        afterPropertiesSet 在接口中 InitializingBean