3

我在我的应用程序中使用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>
4

1 回答 1

11
<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>
于 2013-07-11T02:22:43.083 回答