javax.persistence.Entity doesn't exist

2019-09-16 05:36发布

问题:

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.



标签: jpa javax