相关疑难解决方法(0)

没有Spring Boot的Spring Boot Actuator

我一直在研究Spring/Spring MVC应用程序,我正在寻找性能指标.我遇到过Spring Boot Actuator,它看起来像是一个很好的解决方案.但是我的应用程序不是Spring Boot应用程序.我的应用程序运行在传统容器Tomcat 8中.

我添加了以下依赖项

// Spring Actuator
compile "org.springframework.boot:spring-boot-starter-actuator:1.2.3.RELEASE"
Run Code Online (Sandbox Code Playgroud)

我创建了以下配置类.

@EnableConfigurationProperties
@Configuration
@EnableAutoConfiguration
@Profile(value = {"dev", "test"})
@Import(EndpointAutoConfiguration.class)
public class SpringActuatorConfig {

}
Run Code Online (Sandbox Code Playgroud)

我甚至在每个配置类上添加@EnableConfigurationProperties,如StackOverflow上另一篇文章所建议的那样.然而,这没有做任何事情.端点仍未创建并返回404.

java spring spring-mvc spring-boot

52
推荐指数
5
解决办法
2万
查看次数

标签 统计

java ×1

spring ×1

spring-boot ×1

spring-mvc ×1