smile鲨鱼 2025-03-04 09:46 采纳率: 0%
浏览 8

mybaits分布查询,打包jar后无法找打对应接口

mybaits分布查询,打包jar后无法找打对应接口

使用mybatis的分布查询,在idea中直接运行没有任何问题,但是打包为jar包后运行就无法找对应的接口

img


org.apache.ibatis.binding.BindingException: Type interface com.jd.mapper.GoodsInfoMapper is not known to the MapperRegistry.

img


img


检查jar包所有的文件都没有问题:

img


完整项目在:https://github.com/smile-shark/jd-project-smileshark/tree/master

  • 写回答

3条回答 默认 最新

  • m0_58765004 2025-03-20 11:37
    关注

    报GoodsInfoMapper 没有被扫描到,而本地启动又可以正常访问说明代码没有啥问题,那就是没有被编译到,可以清除idea缓存,或者关闭idea重新打开,重新编译打包,如果都不行就关机重启

    评论

报告相同问题?

问题事件

  • 创建了问题 3月4日