Springboot application.proerties Basic Configuration

Source: Internet
Author: User

#设置日志输出路径, log file name, output log level default log file more than 10M will be cut into multiple files The most recent log file is the log file that is set
Logging.level.root=info
Logging.level.org.springframework.web=info
Logging.level.org.hibernate=info
Logging.path=. /
Logging.file=sboot.log
Logging.pattern.console=%date%-5level%logger{0}-%msg%n
Logging.pattern.file=%date%-5level [%thread]%logger{0} [%file:%line]-%msg%n

Spring.http.encoding.force=true
Spring.http.encoding.charset=utf-8
Spring.http.encoding.enabled=true
Spring.message.encoding=utf-8

#mysql JPA
spring.datasource.url=jdbc:mysql://localhost/springboot?useunicode=true&characterencoding=utf-8& zerodatetimebehavior=converttonull&transformedbitisboolean=true&autoreconnect=true& Failoverreadonly=false
Spring.datasource.username=root
Spring.datasource.password=1
spring.datasource.tomcat.max-active=100
spring.datasource.tomcat.max-idle=200
Spring.datasource.tomcat.initialsize=20
Spring.jpa.database-platform=org.hibernate.dialect.mysql5dialect
Spring.jpa.show-sql=true
#tomcat
Server.port=80
Server.session-timeout=30
Server.tomcat.uri-encoding=utf-8


spring.thymeleaf.prefix=classpath:templates/
Spring.thymeleaf.suffix=.html
Spring.thymeleaf.mode=html5
Spring.thymeleaf.encoding=utf-8
Spring.thymeleaf.content-type=text/html
Spring.thymeleaf.cache=false


#注入到自定义 Bean
Jinxudong.name=jinxudong
Jinxudong.sex=man
Jinxudong.age=24

Springboot application.proerties Basic Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.