我正在开发一个演示示例,演示 Hibernate 的使用
validation API.
I'm trying to use the ClassValidator class.
But the import required for it,
org.hibernate.validator.ClassValidator<User.class> is not getting resolved.
I also have the compatible dependencies
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.2.4.Final</version>
<hibernate.version>4.2.1.Final</hibernate.version>
最佳答案
Update the following
<!-- Hibernate / JPA -->
<hibernate.version>3.0.0.GA</hibernate.version>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.GA</version>
</dependency>
关于hibernate-validator - 导入org.hibernate.validator.ClassValidator无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38895769/