开发者

JSR-303 custom ConstraintValidator in Spring MVC

开发者 https://www.devze.com 2023-01-10 03:12 出处:网络
I am trying to implement a @Future validator for joda time objects. I followed the implemen开发者_JAVA技巧tation for the @Past annotation found here. So far, so good.

I am trying to implement a @Future validator for joda time objects.

I followed the implemen开发者_JAVA技巧tation for the @Past annotation found here. So far, so good.

Now I am failing at telling spring that I have this new constraint. Is there a way to configure the Spring MVC (other than just <mvc:annotation-driven />) to tell him where the validation.xml file is? Or just to directly tell him where my new validator is?

Thanks


The way I use JSR-303 validation has per se nothing to do with spring. How the file is read depends on your implementation lib of JSR-303. It is most then most likely just a bean.

0

精彩评论

暂无评论...
验证码 换一张
取 消