1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 单数据源:spring boot+mybatisplus启动后访问接口报错Invalid bound statement (not found)

单数据源:spring boot+mybatisplus启动后访问接口报错Invalid bound statement (not found)

时间:2022-08-03 16:37:50

相关推荐

单数据源:spring boot+mybatisplus启动后访问接口报错Invalid bound statement (not found)

经检查发现,需要在启动类上加注解

@MapperScan(basePackages = "com.ruifeng.tjtaxiwebqy.mapper")

即:

结果还是报错,然后发现,还需要在配置文件配置mybatisplus的xml地址:

mybatis-plus.mapper-locations=classpath:/mapper/**.xml

然后,访问接口不再报错了,并返回数据正常。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。