【发布时间】:2016-06-07 20:33:50
【问题描述】:
我是 Spring Boot 的新手,我想让我的 Spring Boot 应用程序与 mybatis 和 mysql 数据库集成。 我使用生成器生成实体、映射器接口和映射器 xml 文件。而且我还使用@MapperScan 注释告诉应用程序如何找到映射器,我的 application.yml 如下所示:
spring:
datasource:
username: root
password:
url: jdbc:mysql://localhost:3306/bidding
driver-class-name: com.mysql.jdbc.Driver
mybatis:
mapperLocations: classpath:mapping/*.xml
但是当我使用命令“mvn spring-boot:run”运行应用程序时,它总是给我错误消息“无效绑定语句(未找到)”。
我的代码中是否遗漏了什么?
【问题讨论】:
标签: spring-boot mybatis spring-mybatis