问题
I added the following dependency to Maven:
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
My IDE recognized javax.persistence, but doesn't recognize javax.persistence.Entity.
Do you know why?
回答1:
believe it or not by "mvn install -U" resolved it.
来源:https://stackoverflow.com/questions/43833662/javax-persistence-entity-doesnt-exist