1、配置文件
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
#数据库连接
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://xx.xx.xx.xx:3306/db_mybatis?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=123456
#mybatis配置
mybatis.type-aliases-package=iot.web.springbootmybatis.entity
mybatis.mapper-locations=classpath:mapper/*.xml
2、在dao层加上注解
@Mapper