最小可用工程
项目结构
配置
由于 Springboot 启动时会自动加载 mybatis 相关的东西,因此,需要将 mybatis 相关的配置填上。
resources/application.properties
#####jdbc
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
spring.datasource.username=test
spring.datasource.password=test
mybatis.type-aliases-package=com.lovesqcc.model
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
resources/mybatis/mapper/OrderMapper.xml
resources/spring.xml
xmlns:xsi="http://www.