问题
I'm trying to run a web application using Tomcat but the the application is using libraries such as:
import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
These libraries are not part of the Tomcat spec so I need to add them manually.
What libraries should I add?
回答1:
The javax.validation
package is a Bean Validation (JSR-303) library.
An implementation of this specification is i.e. the Hibernate Validator or the Apache Bean Validation.
回答2:
but for Size and NotNull you need http://www.java2s.com/Code/Jar/b/Downloadbeanvalidatorjar.htm
来源:https://stackoverflow.com/questions/8605753/adding-javax-validation-capabilities-to-tomcat