个人springboot配置项


xml头通用:

<?xml version="1.0" encoding="UTF-8" ?>



      update user set u_name="lisi"
 

?

 

自用pom依赖:



org.mybatis.spring.boot
mybatis-spring-boot-starter
2.1.1




org.springframework.boot
spring-boot-starter-mail




org.springframework.boot
spring-boot-starter-jdbc



org.springframework.boot
spring-boot-starter-thymeleaf




org.springframework.boot
spring-boot-starter-web




org.springframework.boot
spring-boot-devtools
runtime
true




mysql
mysql-connector-java
runtime




org.projectlombok
lombok
true




io.springfox
springfox-swagger2
2.7.0


io.springfox
springfox-swagger-ui
2.7.0

properties配置文件:

#应用名称
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