Java 类org.springframework.validation.beanvalidation.MethodValidationPostProcessor 实例源码

项目:spring4-understanding    文件:ScheduledAnnotationBeanPostProcessorTests.java   
@Test(expected = BeanCreationException.class)
public void cronTaskWithMethodValidation() throws InterruptedException {
    BeanDefinition validationDefinition = new RootBeanDefinition(MethodValidationPostProcessor.class);
    BeanDefinition processorDefinition = new RootBeanDefinition(ScheduledAnnotationBeanPostProcessor.class);
    BeanDefinition targetDefinition = new RootBeanDefinition(CronTestBean.class);
    context.registerBeanDefinition("methodValidation", validationDefinition);
    context.registerBeanDefinition("postProcessor", processorDefinition);
    context.registerBeanDefinition("target", targetDefinition);
    context.refresh();
}
项目:spring4-understanding    文件:MethodValidationTests.java   
@Test
public void testMethodValidationPostProcessor() {
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.registerSingleton("mvpp", MethodValidationPostProcessor.class);
    MutablePropertyValues pvs = new MutablePropertyValues();
    pvs.add("beforeExistingAdvisors", false);
    ac.registerSingleton("aapp", AsyncAnnotationBeanPostProcessor.class, pvs);
    ac.registerSingleton("bean", MyValidBean.class);
    ac.refresh();
    doTestProxyValidation(ac.getBean("bean", MyValidInterface.class));
    ac.close();
}
项目:av-service    文件:SpringWebConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor(Validator validator) {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(validator);

    return processor;
}
项目:infobip-bean-validation    文件:BeanValidationAutoConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor(ConstraintViolationExceptionMapper<?> exceptionMapper) {
    MethodValidationPostProcessor postProcessor = new CustomMethodValidationPostProcessor(exceptionMapper);
    postProcessor.setValidator(localValidatorFactoryBean());
    return postProcessor;
}
项目:spring-boot-boilerplate    文件:ShowcaseApplication.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor(){
    return new MethodValidationPostProcessor();
}
项目:spring-cloud-dashboard    文件:WebConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:spring-cloud-dashboard    文件:TestDependencies.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:short-url    文件:GlobalExceptionHandler.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:k-framework    文件:MethodValidationPostProcessorAutoConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:springboot-analysis    文件:BeanPostProcessorApplication.java   
@Bean
public BeanPostProcessor methodValidationPostProcessor() {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    return processor;
}
项目:bookManager    文件:RootApplicationContextConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() throws ClassNotFoundException {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(this.localValidatorFactoryBean());
    return processor;
}
项目:code-examples    文件:SpringConfig.java   
@Bean
public MethodValidationPostProcessor getMethodValidationPostProcessor(Validator validator) {
    MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor();
    methodValidationPostProcessor.setValidator(validator);
    return methodValidationPostProcessor;
}
项目:foosie    文件:ApplicationConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:LSChatServer    文件:ApplicationRootContext.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() throws ClassNotFoundException {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(this.localValidatorFactoryBean());
    return processor;
}
项目:music-for-all-application    文件:WebAppConfig.java   
@Bean
public MethodValidationPostProcessor getMethodValidationPostProcessor() {
    final MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(validator());
    return processor;
}
项目:spring-boot-sample    文件:WebMvcConfig.java   
/**
 * 注册bean验证
 * @return
 */
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor(){
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    return processor;
}
项目:spring-cloud    文件:ApplicationConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {//用于参数验证
    return new MethodValidationPostProcessor();
}
项目:spring-cloud    文件:ApplicationConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {//开启bean验证

    return new MethodValidationPostProcessor();
}
项目:spring-cloud-dataflow    文件:WebConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:spring-cloud-dataflow    文件:TestDependencies.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:com.hotfixs.books    文件:AppConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:agate    文件:ValidationConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
  MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
  processor.setValidator(validator());
  return processor;
}
项目:spring-data-demo    文件:AppConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:spring-data-demo    文件:AppConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:spring-data-demo    文件:AppConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:spring-data-demo    文件:AppConfig.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:mica2    文件:ValidationConfiguration.java   
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
  MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
  processor.setValidator(validator());
  return processor;
}
项目:codekvast    文件:ValidationConfig.java   
@Bean
MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}
项目:hawkbit    文件:RepositoryApplicationConfiguration.java   
/**
 * Defines the validation processor bean.
 *
 * @return the {@link MethodValidationPostProcessor}
 */
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    return new MethodValidationPostProcessor();
}