个人springboot配置项

update user set u_name="lisi"​

应用名称

spring.application.name=auction_java

应用服务 WEB 访问端口

server.port=8080

数据库驱动:

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

数据库连接地址

spring.datasource.url=jdbc:mysql://localhost:3306/auction?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC

数据库用户名&密码:

spring.datasource.username=root
spring.datasource.password=root

邮箱配置

用的是qq邮箱

spring.mail.host = smtp.qq.com

改成自己的邮箱

spring.mail.username = 1185470931@qq.com

发送短信后它给你的授权码 填写到这里

spring.mail.password = aqsaiywprwxtgabb

这东西不用改

spring.mail.properties.mail.smtp.ssl.enable=true

编码格式

spring.mail.default-encoding=UTF-8

THYMELEAF (ThymeleafAutoConfiguration)

开启模板缓存(默认值: true )

spring.thymeleaf.cache=true

检查模板是否存在,然后再呈现

spring.thymeleaf.check-template=true

检查模板位置是否正确(默认值 :true )

spring.thymeleaf.check-template-location=true

Content-Type 的值(默认值: text/html )

spring.thymeleaf.content-type=text/html

开启 MVC Thymeleaf 视图解析(默认值: true )

spring.thymeleaf.enabled=true

模板编码

spring.thymeleaf.encoding=UTF-8

要被排除在解析之外的视图名称列表,⽤逗号分隔

spring.thymeleaf.excluded-view-names=

要运⽤于模板之上的模板模式。另⻅ StandardTemplate-ModeHandlers( 默认值: HTML5)

spring.thymeleaf.mode=HTML5

在构建 URL 时添加到视图名称前的前缀(默认值: classpath:/templates/ )

spring.thymeleaf.prefix=classpath:/templates/

在构建 URL 时添加到视图名称后的后缀(默认值: .html )

spring.thymeleaf.suffix=.html

配置mapper

mybatis.mapper-locations=classpath:mapper/*.xml

Original: https://www.cnblogs.com/LinkL/p/15986555.html
Author: LinkL1
Title: 个人springboot配置项

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/580748/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球