在使用Spring JPA时, 启动程序时如果抛出Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.xxxx.xxx 的异常, 主要是因为指定@Entity,@ID的包不是javax.persistence。 换一下引入的类就好了。
Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.xxxx.xxx
最新推荐文章于 2023-12-16 09:15:32 发布
本文指导如何修复在使用SpringJPA时遇到的因类型定义包不正确导致的IllegalArgumentException,只需调整实体和ID注解的包导入即可。

1605

被折叠的 条评论
为什么被折叠?



