配置文件中(.yml):连接数据库信息:driver/jdbc/Url/user/password
指定映射器的路径
spring:
datasource:
url: jdbc:mysql://localhost:3306/employee?serverTimezone=UTC
username: root
password: admin
mybatis:
mapper-locations: mapper/*.xml
type-aliases-package: com.djh.demo.bean
实体类都要实现io接口,便于数据传输
配置别名:
1 type-aliases-package