我有弹簧MVC Web应用程序。我已经在其中使用了弹簧启动器,通过添加下面的依赖关系。如何注册弹簧MVC应用程序以启动弹出管理器
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.4.0.RELEASE</version>
</dependency>
在我的配置文件中,我导入了如下类。
@Configuration
@ComponentScan({"com.test.*"})
@Import({EndpointWebMvcAutoConfiguration.class,
ManagementServerPropertiesAutoConfiguration.class, EndpointAutoConfiguration.class,
HealthIndicatorAutoConfiguration.class,PublicMetricsAutoConfiguration.class})
@EnableWebMvc
@PropertySource("classpath:appconfig.properties")
public class SpringWebConfig extends WebMvcConfigurerAdapter {
}
现在,当我打的网址 “http://localhost:8080/health”,我得到响应
{"status":"UP","diskSpace":{"status":"UP","total":493767094272,"free":417100754944,"threshold":10485760}}
所以,这个完美的作品。现在我的问题是如何将这个Spring MVC Web应用程序注册到spring-boot-admin服务器。
任何人都可以帮助我吗?
[文档](http://codecentric.github.io/spring-boot-admin/1.4.1/#getting-started)是什么意思? –
我做了这部分,遵循文档并将其应用于应用程序中,但未显示任何错误并未注册到管理服务器。 – Harshil