1.服务端依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
2.登录邮箱->设置->账户->开启IMAP/SMTP服务(去百度)
3.配置yml文件
spring:
security:
user:
name: admin
password: admin
boot:
admin:
ui:
title: 服务状态监控
notify:
mail:
enabled: true
from: xxx@qq.com
ignore-changes:
to: xxxx@qq.com
mail:
host: smtp.qq.com
protocol: smtps #465端口需设置为smtps
port: 465
username: xxx@qq.com
password: btyncctnyckoecdf
properties:
mail:
smtp:
auth: true
ssl:
enable: true
starttls:
enable: true
required: true
4.启动项目,邮箱查询
最后
以上就是靓丽鞋垫最近收集整理的关于Springboot admin 微服务监控,宕机邮件提醒的全部内容,更多相关Springboot内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复