spring boot 简要常用配置
# 激活开发环境
spring.profiles.active=dev
spring.mvc.date-format=yyyy-MM-dd HH:mm:ss
spring.http.encoding.charset=utf-
#上传文件大小
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=100MB
#jackson配置 指json数据格式化和反格式化时的日期格式,spring默认使用的是jackson
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+
spring.jackson.default-property-inclusion=non_null
spring.jackson.serialization.fail-on-empty-beans=true
spring.jackson.deserialization.fail-on-unknown-properties=false
#配置数据源
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3316/test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.tomcat.max-active=
spring.datasource.tomcat.min-idle=
spring.datasource.tomcat.initialSize=
#jpa 配置
spring.jpa.database=mysql
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.idalect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.open-in-view=true
spring.jpa.show-sql=true
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
#tomcat
server.port=
server.servlet.context-path=/test
server.tomcat.uri-encoding=UTF-
# 日志
logging.config=classpath:logback-dev.xml
#thymeleaf
spring.thymeleaf.encoding=UTF-
spring boot 简要常用配置的更多相关文章
- spring boot应用常用配置
pom.xml <!--自动打包--> <plugin> <groupId>org.springframework.boot</groupId> < ...
- Spring Boot 外部化配置(一)- Environment、ConfigFileApplicationListener
目录 前言 1.起源 2.外部化配置的资源类型 3.外部化配置的核心 3.1 Environment 3.1.1.ConfigFileApplicationListener 3.1.2.关联 Spri ...
- Spring Boot 2.0 配置图文教程
摘要: 原创出处 https://www.bysocket.com 「公众号:泥瓦匠BYSocket 」欢迎关注和转载,保留摘要,谢谢! 本章内容 自定义属性快速入门 外化配置 自动配置 自定义创建 ...
- spring boot中常用的配置文件的重写
@Configuration public class viewConfigSolver extends WebMvcConfigurerAdapter { /* spring boot 已经自动配置 ...
- spring boot日志管理配置
spring Boot在所有内部日志中使用Commons Logging,但是默认配置也提供了对常用日志的支持,如:Java Util Logging,Log4J,Log4J2和Logback.每种L ...
- Spring Boot 外部化配置(二) - @ConfigurationProperties 、@EnableConfigurationProperties
目录 3.外部化配置的核心 3.2 @ConfigurationProperties 3.2.1 注册 Properties 配置类 3.2.2 绑定配置属性 3.1.3 ConfigurationP ...
- spring boot web相关配置
spring boot集成了servlet容器,当我们在pom文件中增加spring-boot-starter-web的maven依赖时,不做任何web相关的配置便能提供web服务,这还得归于spri ...
- 初识Spring Boot框架(二)之DIY一个Spring Boot的自动配置
在上篇博客初识Spring Boot框架中我们初步见识了SpringBoot的方便之处,很多小伙伴可能也会好奇这个Spring Boot是怎么实现自动配置的,那么今天我就带小伙伴我们自己来实现一个简单 ...
- Spring boot 的自动配置
Xml 配置文件 日志 Spring Boot对各种日志框架都做了支持,我们可以通过配置来修改默认的日志的配置: #设置日志级别 logging.level.org.springframework=D ...
随机推荐
- SpringBoot——读取配置文件@Value和@Configuration比较
1.@Configuration package com.xgcd.springboot.bean; import org.springframework.boot.context.propertie ...
- Wordpress 获取 custom post type 的当前文章 分类信息
// knowledgebase_category 为 custom post type taxonomy $terms = get_the_terms( get_the_ID() , 'knowle ...
- nodejs爬虫如何设置动态ip以及userAgent
nodejs爬虫如何设置动态ip以及userAgent 转https://blog.csdn.net/u014374031/article/details/78833765 前言 在写nodejs爬虫 ...
- Android dump命令查看某个apk是被谁安装的?
adb shell dumpsys package packages > packageAll.txt ORadb shell pm dump packages > package ...
- js 秒的倒计时,将秒转换为时分秒显示
在VUE 中的使用 {{moveMin}} // ...methods: { // 补0 formatBit (val) { val = +val ? val : ' + val }, // 秒转时分 ...
- matlab学习笔记10_5 通用字符串操作和比较函数
一起来学matlab-matlab学习笔记10 10_5 通用字符串操作和比较函数 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考书籍 <matlab 程序设计与综合应用>张 ...
- 查看已安装dpkg包的poinst安装文件
/var/lib/dpkg/info |grep printburn(软件名称) /var/lib/dpkg/info 文件都在这个目录下面poinst, preinst,prerm等
- [LeetCode] 49. Group Anagrams 分组变位词
Given an array of strings, group anagrams together. For example, given: ["eat", "tea& ...
- [LeetCode] 624. Maximum Distance in Arrays 数组中的最大距离
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from t ...
- webpack 4.0改版问题
4.0之后的打包方式: webpack --mode development src/index.js --output-filename app.js --output-path dist