配置文件都是在resources下的application.properties文件里面写的
server.port=8080
server.context.path=/
#配置数据库
spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
#指定HttpServletRequest的属性是否可以覆盖controller的model的同名项
spring.freemarker.allow-request-override=false
#req访问request
spring.freemarker.request-context-attribute=req
#后缀名freemarker默认后缀为.ftl,当然你也可以改成自己习惯的.html
spring.freemarker.suffix=.ftl
#设置响应的内容类型
spring.freemarker.content-type=text/html;charset=utf-8
#是否允许mvc使用freemarker
spring.freemarker.enabled=true
#是否开启template caching
spring.freemarker.cache=false
#设定模板的加载路径,多个以逗号分隔,默认: [“classpath:/templates/”]
spring.freemarker.template-loader-path=classpath:/templates/
#设定Template的编码
spring.freemarker.charset=UTF-8
#数字格式化,无小数点
spring.freemarker.number_format=0.##
#打印mybatis的注解sql语句
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#使用xml写sql语句就需要加上这行注解,第一个xml为文件夹的名字
mybatis.mapper-locations=classpath:xml/*.xml