我在我的应用程序中使用 Javamelody 。我只需要root用户访问统计信息。默认情况下,您可以访问Javamelody
http://localhost/webapp/monitoring
我需要将其更改为
http://localhost/webapp/monitor/monitoring
我已完成以下过滤器映射
<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>
答案 0 :(得分:10)
<filter>
<filter-name>monitoring</filter-name>
<filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
<init-param>
<param-name>monitoring-path</param-name>
<param-value>/admin/monitoring</param-value>
</init-param>
</filter>