springboot中简单配置文件之数据库、邮件服务

#Tomcat端口
server.port=8090

logging.path=/user/local/log
logging.level.com.favorites=DEBUG
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=ERROR

#数据库相关
spring.datasource.url=jdbc:mysql://localhost:3308/test?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.show-sql= true

#邮箱服务器地址
spring.mail.host=smtp.qq.com
#用户名
[email protected]
#设置密码,该处的密码是QQ邮箱开启SMTP的授权码而非QQ密码
spring.mail.password=nnijfqmnegdlcbaf
spring.mail.port=465
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
spring.mail.default-encoding=UTF-8

spring.mail.properties.mail.smtp.auth=true
#STARTTLS[1] 是对纯文本通信协议的扩展。它提供一种方式将纯文本连接升级为加密连接(TLS或SSL),而不是另外使用一个端口作加密通信
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.ssl.enable=true
spring.mail.properties.smtp.auth=true

#以谁来发送邮件
[email protected]

猜你喜欢

转载自blog.csdn.net/u010450931/article/details/87969781
今日推荐