application.properties

本文详细解析了Spring Boot项目的配置文件内容,包括数据库连接、JPA设置、Thymeleaf模板引擎、Redis缓存、日志记录及文件上传限制等关键参数的配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#MySQL
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/legal_system?characterEncoding=utf8
spring.datasource.username=XXX
spring.datasource.password=XXX
## 是否自动建表
spring.jpa.properties.hibernate.hbm2ddl.auto=update
#是否打印sql
spring.jpa.show-sql=true
#没有这个不能再IDE中启动
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect


spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.jackson.serialization.write-dates-as-timestamps=false

#redis
spring.redis.host=192.168.31.87
spring.redis.port=6379
#配置静态页面地址
#spring.thymeleaf.prefix=file:./static/
spring.thymeleaf.prefix=classpath:static/
spring.thymeleaf.suffix=.html
#html的热部署,也就是修改了html后不用重启,刷新页面就能看到效果。修改完html后一定要ctrl+f9重新build一下
spring.thymeleaf.cache=false
spring.thymeleaf.mode = LEGACYHTML5
debug = false

#日志配置
logging.file=./logs/legal.log
logging.level.root=warn
logging.level.com.project.legal=debug
#上传文件大小限制
spring.http.multipart.max-file-size=100Mb
spring.http.multipart.max-request-size=500Mb

转载于:https://www.cnblogs.com/lxxyd/p/10768419.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值