栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

启动springboot的JPA项目爆出javax.interceptor.InterceptorBinding not found,用错了包名下的@Transactional

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

启动springboot的JPA项目爆出javax.interceptor.InterceptorBinding not found,用错了包名下的@Transactional

错误

背景:springboot和JPA项目,启动项目的时候发现错误

java:
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for javax.interceptor.InterceptorBinding not found

更多项目的细节:使用了@Transactional注解(因为JPA的Repository类自定义的update/delete方法必须加上@Transactional(或者在上一层Service层加,总之执行过程必须有,否则运行时出现异常)

解决

引入的@Transactional注解的包错了,不是javax.annotation.Transactional,是spring的(org.springframework.transaction.annotation.Transactional

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1032883.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号