springboot的application.yml配置
2020-07-14 05:56
411 查看
springboot+mybatis+thymeleaf
server: port: 443 #项目端口号 ssl: #ssl证书配置 key-store: classpath:client.pfx key-store-type: PKCS12 key-store-password: e9wb6Go8 web: #服务器静态资源路径 upload-path: /www/server/webapps/upload front-path: /www/server/webapps/upload spring: servlet: multipart: enabled: true #是否启用http上传处理 max-request-size: 100MB #最大请求文件的大小 max-file-size: 20MB #设置单个文件最大长度 file-size-threshold: 20MB #当文件达到多少时进行磁盘写入 datasource: #mysql5 中com.mysql.jdbc.Driver #mysql6 中com.mysql.cj.jdbc.Driver 注意连接时需要指定时区serverTimezone driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/fangdichan?serverTimezone=UTC&characterEncoding=utf-8 username: #数据库账号 password: #数据库密码 type: com.alibaba.druid.pool.DruidDataSource resources: #项目中静态资位置 static-locations : classpath:/static/,file:${web.upload-path},file:${web.front-path} devtools: restart: enabled: true #设置开启热部署 additional-paths: src/main/java #重启目录 exclude: classpath:/templates/ freemarker: cache: false #页面不加载缓存,修改即时生效 template: cache: false thymeleaf: prefix: classpath:/templates/ #prefix:指定模板所在的目录 check-template-location: true #check-tempate-location: 检查模板路径是否存在 cache: false #cache: 是否缓存,开发模式下设置为false,避免改了模板还要重启服务器,线上设置为true,可以提高性能。 suffix: .html #encoding: UTF-8 #content-type: text/html mode: HTML5 mvc: dateFormat: yyyy-MM-dd HH:mm:ss #配置时间格式前台传时间要转成该格式,否者会报错 favicon: enabled: false #关闭springboot自带的favicon图标 jackson: date-format: yyyy-MM-dd HH:mm:ss #配置时间格式前台传时间要转成该格式,否者会报错 time-zone: GMT+8 mybatis: #扫描classpath中mapper目录下的映射配置文件,针对与映射配置文件放到了resource目录下 mapper-locations: classpath:mapper/*.xml #标签作用mapper.xml中返回pojo时不需要写包名,直接写对象名即可 type-aliases-package: com.bz.bean
相关文章推荐
- SpringBoot获取配置文件application.yml,和application.properties中的配置
- springboot配置文件 application.yml注意事项(Failed to load property source from location 'classpath:/applica)
- springboot的application.yml简单配置rabbitmq和redis,设置rabbitmq重试次数
- SpringBoot启动时是如何加载配置文件application.yml文件
- spring boot 读取配置文件(application.yml)中的属性值
- springboot 修改默认端口及application.properties常用配置
- spring boot 读取配置文件(application.yml)中的属性值
- Springboot集成druid数据源、mybatis---yml配置文件配置内容
- SpringBoot属性文件配置(application.properties/yml)
- SpringBoot配置文件YML 注意事项
- application.properties/application.yml文件中配置项
- SpringBoot 配置文件application.properties
- application.yml配置详情
- springboot的application.properties配置文件的JDBC的相关配置.
- springboot 使用yml配置文件自定义属性
- spring boot 读取配置文件(application.yml)中的属性值
- SpringBoot从yml配置文件中读常用参数值实例方法
- SpringBoot application.properties和application.yml配置详解
- [转]application.properties详解 --springBoot配置文件
- SpringBoot的.yml配置文件