在尝试进行spring boot和mybatis的整合,但运行时总是报Invalid bound statement (not found)这个错,搜索了一下很多人认为是mapper找不到所致,我是用工具生成的mapper,有接口和xml文件两个部分,xml文件位置在application.yml中该如何配置呢?我现在的配置如下
spring:
datasource:
username: root
password:
url: jdbc:mysql://localhost:3306/test
driver-class-name: com.mysql.jdbc.Driver
mybatis:
mapperLocations: classpath:mapping/*.xml
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
已经解决,是mapper的xml文件路径配置问题