Closed lwshiwook closed 5 years ago
使用api形式先校验,result是
Result{isSuccess=false, errors=[xxxxxxx]}
但是用aop形式就会打印
Annotation-based validation enabled for ArticleWithContent, and to-do validators are empty
然后校验通过,何解?
附上我的配置方式
@Bean(name="fluentValidateInterceptor") public FluentValidateInterceptor interceptor() { FluentValidateInterceptor interceptor = new FluentValidateInterceptor(); interceptor.setCallback(callback); return interceptor; } @Bean public BeanNameAutoProxyCreator transactionAutoProxy() { BeanNameAutoProxyCreator transactionAutoProxy = new BeanNameAutoProxyCreator(); transactionAutoProxy.setBeanNames("*ServiceImpl"); transactionAutoProxy.setInterceptorNames("fluentValidateInterceptor"); return transactionAutoProxy; }
我的错,没有指定groups
使用api形式先校验,result是
但是用aop形式就会打印
然后校验通过,何解?
附上我的配置方式