简体   繁体   中英

JSR-303 custom ConstraintValidator in Spring MVC

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

I followed the implementation 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM