javamelody配置

1、maven增加依赖

<dependency>
 <groupId>net.bull.javamelody</groupId>
 <artifactId>javamelody-core</artifactId>
 <version>1.50.0</version>
</dependency>

2、配置web.xml

    <!-- java melody-->
    <filter>
        <filter-name>monitoring</filter-name>
        <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>monitoring</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <listener>
        <listener-class>net.bull.javamelody.SessionListener</listener-class>
    </listener>

 

3、下载javamelody的war包部署

    https://github.com/javamelody/javamelody/releases

    访问http://ip:port/monitoring

 

你可能感兴趣的:(javamelody配置)