1

我想通过本教程将 spring-boot-admin-starter-client 注册到 spring-boot-admin-server 中:http: //codecentric.github.io/spring-boot-admin/1.4.5/#register-client-应用

但运行后我得到错误:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 2 of method applicationFactory in de.codecentric.boot.admin.config.SpringBootAdminClientAutoConfiguration required a bean of type 'org.springframework.boot.autoconfigure.web.ServerProperties' that could not be found.
        - Bean method 'serverProperties' in 'ManagementServerPropertiesAutoConfiguration' not loaded because @ConditionalOnWebApplication (required) not a web application
        - Bean method 'serverProperties' not loaded because @ConditionalOnWebApplication (required) not a web application


Action:

Consider revisiting the conditions above or defining a bean of type 'org.springframework.boot.autoconfigure.web.ServerProperties' in your configuration.

请问有人知道怎么解决吗??

4

1 回答 1

1

要使用管理服务注册任何客户端......我们需要以下内容

  1. pom.xml 中的 Spring-boot-admin-starter-client 依赖项

2.您的 bootstrap.properties 中的以下属性

  • spring.boot.admin.client.url =your url of spring boot admin

  • spring.boot.admin.client.username=username of your spring boot admin

  • spring.boot.admin.client.password=password of your spring boot admin

于 2020-02-03T14:55:06.273 回答