springboot 配置mybatis 配置mapper.xml

#  插件    进行配置  也可以用yml
# 1. 配置 Tomcat  修改端口号
server.port=8848
server.context-path=/zxf


#2.配置数据源
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/qy100
spring.datasource.username=root
spring.datasource.password=root

#3.配置mybatis
#3.1 给mapper.xml 中需要返回的实体类起别名,直接扫描包的形式进行操作。
mybatis.type-aliases-package=com.aaa.zxf.model

#3.2 配置mapper.xml的映射  支持通配符
mybatis.mapper-locations=classpath:mapper/*Mapper.xml


#4  springboot  配置thymeleaf
#4.1先手动修改他的缓存(开发阶段) ,默认是true ,改为false
#4.2  不配置也可以直接使用。
spring.thymeleaf.cache=false

#5. 启用不严谨 检查HTML  LEGACYHTML5
# 导入jar包
spring.thymeleaf.mode=LEGACYHTML5

猜你喜欢

转载自www.cnblogs.com/ZXF6/p/11375716.html