无法解析导入 org.hibernate.validator.ClassValidator
The import org.hibernate.validator.ClassValidator cannot be resolved
我正在开发一个演示示例,演示如何使用 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 的
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>