Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错java.lang.ClassNotFoundException: jakarta.persistence.Table #109

Open
chenxin4839 opened this issue May 21, 2024 · 3 comments
Open

Comments

@chenxin4839
Copy link

查询报错Table无法找到
mybatis-mapper:2.2.2
mybatis-spring-boot-starter:3.0.3

@abel533
Copy link
Contributor

abel533 commented May 21, 2024

有没有添加下面的依赖?

 <dependency>
      <groupId>jakarta.persistence</groupId>
      <artifactId>jakarta.persistence-api</artifactId>
      <version>3.1.0</version>
    </dependency>

发一下完整异常。

@chenxin4839
Copy link
Author

添加jpa依赖之后没有问题,这个属于必要依赖为什么要在2.2.2版本移除呢
微信截图_20240522140657

@abel533
Copy link
Contributor

abel533 commented May 23, 2024

2.2.2 版本移出的旧版本的 jpa,不是 jakarta 版本的 jpa,目前依赖是 provided,需要自己手动添加依赖。。下个版本改为直接引入。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants