mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Ensure actuator works without Spring MVC
Update MetricFilterAutoConfiguration to ensure that it is only applied if Spring MVC is on the classpath. Fixes gh-2542
This commit is contained in:
parent
8e594c790e
commit
4cac9d7382
@ -53,7 +53,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
@Configuration
|
||||
@ConditionalOnBean({ CounterService.class, GaugeService.class })
|
||||
@ConditionalOnClass({ Servlet.class, ServletRegistration.class,
|
||||
OncePerRequestFilter.class })
|
||||
OncePerRequestFilter.class, HandlerMapping.class })
|
||||
@AutoConfigureAfter(MetricRepositoryAutoConfiguration.class)
|
||||
public class MetricFilterAutoConfiguration {
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jersey</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
|
Loading…
Reference in New Issue
Block a user