Open zhuangjinxin opened 6 years ago
Gradle添加完依赖之后报错:
Project resolve errors
Warning:<i><b>root project 'spring-boot': Unable to resolve additional project configuration.</b>
Details: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':compileClasspath'.
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download guava.jar (com.google.guava:guava:14.0.1)
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/14.0.1/guava-14.0.1.jar'.
Caused by: java.net.SocketTimeoutException: Read timed out</i>
Warning:<i><b>root project 'spring-boot': Unable to resolve additional project configuration.</b>
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compileClasspath'.
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download guava.jar (com.google.guava:guava:14.0.1)
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/14.0.1/guava-14.0.1.jar'.
Caused by: java.net.SocketTimeoutException: Read timed out</i>
spring-boot-application (e34430a9)>Trace 页面报错提示:
Error: {"timestamp":1516851689456,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/trace"}
spring-boot-application (e34430a9)>Logging页面报错提示:
Error:{"error": "Couldn't find Logback JMXConfigurator-MBean"}
Spring Boot Client 端 :
如果management.security.enabled=true
,Admin UI 只显示Client的状态(Status only)。
关停Client,Admin发送邮件时报错:
2018-01-25 12:49:23.469 ERROR 8225 --- [ updateTask1] d.c.boot.admin.notify.MailNotifier : Couldn't notify for event de.codecentric.boot.admin.event.ClientApplicationStatusChangedEvent@a01ffe35
org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [HK2PR0302CA0002.apcprd03.prod.outlook.com]
javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [HK2P15301CA0008.APCP153.PROD.OUTLOOK.COM]
基础配置
Spring Boot Admin Server:
1.添加依赖:
2.添加注解: 在启动类上添加
@EnableAdminServer
注解;3.浏览器访问
http://localhost:8080
;Spring Boot Admin Client:
1.添加依赖
2.添加配置:
启动和关停Client,浏览器有提示。
安全设置(拓展)
Admin Server端:
1.添加依赖:
2.自定义配置:
3.添加配置:
Admin Client端:
在配置文件中添加:
重启Admin Server端和Client端,输入密码即可访问查看!
邮件配置
在Server端: 1.添加依赖:
2.添加配置:
参考链接:
http://www.baeldung.com/spring-boot-admin
https://dzone.com/articles/a-look-at-spring-boot-admin