@Configuration @EnableConfigurationProperties(value=JavaMelodyConfigurationProperties.class) @ConditionalOnWebApplication @ConditionalOnProperty(prefix="javamelody", name="enabled", matchIfMissing=true) public class JavaMelodyAutoConfiguration extends Object
This class is picked up by the Spring Boot auto-configuration mechanism and creates the beans required to set up JavaMelody.
Configuration values are injected using JavaMelodyConfigurationProperties.
The auto-configured filter can be overridden by defining a custom FilterRegistrationBean with the name
"javamelody-registration" in the application context.
The configuration is enabled for web applications by default. It is possible to opt-out of the auto-configuration by setting the application configuration "javamelody.enabled" to the value "false".
| Modifier and Type | Field and Description |
|---|---|
static String |
REGISTRATION_BEAN_NAME
Name of the FilterRegistrationBean.
|
| Constructor and Description |
|---|
JavaMelodyAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator |
defaultAdvisorAutoProxyCreator() |
net.bull.javamelody.SpringDataSourceBeanPostProcessor |
monitoringDataSourceBeanPostProcessor(String excludedDatasources)
Monitoring of JDBC Data Sources
|
org.springframework.boot.web.servlet.FilterRegistrationBean |
monitoringFilter(JavaMelodyConfigurationProperties properties)
Registers the JavaMelody monitoring filter.
|
net.bull.javamelody.SessionListener |
monitoringSessionListener()
Registers the JavaMelody session listener.
|
net.bull.javamelody.MonitoringSpringAdvisor |
monitoringSpringAdvisor()
Monitoring of beans and methods having the
MonitoredWithSpring annotation. |
net.bull.javamelody.MonitoringSpringAdvisor |
monitoringSpringControllerAdvisor()
Monitoring of beans having the
Controller annotation. |
net.bull.javamelody.MonitoringSpringAdvisor |
monitoringSpringRestControllerAdvisor()
Monitoring of beans having the
RestController annotation. |
net.bull.javamelody.MonitoringSpringAdvisor |
monitoringSpringServiceAdvisor()
Monitoring of beans having the
Service annotation. |
public static final String REGISTRATION_BEAN_NAME
@Bean public net.bull.javamelody.SessionListener monitoringSessionListener()
@Bean(name="javamelody-registration") @ConditionalOnMissingBean(name="javamelody-registration") public org.springframework.boot.web.servlet.FilterRegistrationBean monitoringFilter(JavaMelodyConfigurationProperties properties)
FilterRegistrationBean with the name "javamelody-registration" in the application context.properties - JavaMelodyConfigurationProperties@Bean @ConditionalOnMissingBean(value=org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator.class) public org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator()
@Bean
public net.bull.javamelody.SpringDataSourceBeanPostProcessor monitoringDataSourceBeanPostProcessor(@Value(value="${javamelody.excluded-datasources:}")
String excludedDatasources)
excludedDatasources - Comma separated list of excluded datasources@Bean
@ConditionalOnProperty(prefix="javamelody",
name="spring-monitoring-enabled",
matchIfMissing=true)
public net.bull.javamelody.MonitoringSpringAdvisor monitoringSpringAdvisor()
MonitoredWithSpring annotation.@Bean
@ConditionalOnProperty(prefix="javamelody",
name="spring-monitoring-enabled",
matchIfMissing=true)
public net.bull.javamelody.MonitoringSpringAdvisor monitoringSpringServiceAdvisor()
Service annotation.@Bean
@ConditionalOnProperty(prefix="javamelody",
name="spring-monitoring-enabled",
matchIfMissing=true)
public net.bull.javamelody.MonitoringSpringAdvisor monitoringSpringControllerAdvisor()
Controller annotation.@Bean
@ConditionalOnProperty(prefix="javamelody",
name="spring-monitoring-enabled",
matchIfMissing=true)
public net.bull.javamelody.MonitoringSpringAdvisor monitoringSpringRestControllerAdvisor()
RestController annotation.Copyright © 2017. All rights reserved.