springboot整合jpa的问题

问题:java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
这个问题我从网上看到说是hibernate的bug也给出了eclipse的解决方案 但是问题是我用的是idea 我没有找到Javaee.jar这个包 大神们有知道的吗?感谢!
已邀请:

lowzj - github.com/lowzj

赞同来自:

	/**
* Returns the validation mode to be used by the persistence
* provider for the persistence unit. The validation mode
* corresponds to the <code>validation-mode</code> element in the
* <code>persistence.xml</code> file.
*
* @return the validation mode to be used by the
* persistence provider for the persistence unit
*
* @since Java Persistence 2.0
*/
public ValidationMode getValidationMode();
版本问题,2.0之后才有这个方法,可用这个替代:
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>

要回复问题请先登录注册