异常
Caused by: java.lang.StackOverflowError
at java.lang.reflect.Method.hashCode(Method.java:330) ~[?:1.8.0_65]
at java.util.HashMap.hash(HashMap.java:338) ~[?:1.8.0_65]
at java.util.HashMap.put(HashMap.java:611) ~[?:1.8.0_65]
at java.util.HashSet.add(HashSet.java:219) ~[?:1.8.0_65]
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1119) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1183) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1208) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1086) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1060) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotationAttributes(AnnotatedElementUtils.java:656) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(AnnotatedElementUtils.java:730) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:314) ~[spring-context-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.getHealthCheckRegistry(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getHealthCheckRegistry(MetricsConfigurerComposite.java:68) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getHealthCheckRegistry(DelegatingMetricsConfiguration.java:69) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.CGLIB$getHealthCheckRegistry$3(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e$$FastClassBySpringCGLIB$$7853f663.invoke(<generated>) ~[metrics-spring-3.1.3.jar:?]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) ~[spring-context-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.getHealthCheckRegistry(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getHealthCheckRegistry(MetricsConfigurerComposite.java:68) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getHealthCheckRegistry(DelegatingMetricsConfiguration.java:69) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.CGLIB$getHealthCheckRegistry$3(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e$$FastClassBySpringCGLIB$$7853f663.invoke(<generated>) ~[metrics-spring-3.1.3.jar:?]
[... repeat 100 times ...]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) ~[spring-context-4.3.0.RELEASE.jar:4.3.0.RELEASE]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.getHealthCheckRegistry(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getHealthCheckRegistry(MetricsConfigurerComposite.java:68) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getHealthCheckRegistry(DelegatingMetricsConfiguration.java:69) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e.CGLIB$getHealthCheckRegistry$3(<generated>) ~[metrics-spring-3.1.3.jar:?]
at com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$2cc24d5e$$FastClassBySpringCGLIB$$7853f663.invoke(<generated>) ~[metrics-spring-3.1.3.jar:?]
临时方案
去掉@EnableMetrics
增加如下配置
@Configuration
public class CustomDelegatingMetricsConfiguration extends DelegatingMetricsConfiguration {
@Override
@Autowired(required = false)
public void setMetricsConfigurers(final List<MetricsConfigurer> configurers) {
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。