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

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

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

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

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

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

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

 

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