@At("/test/js")
public void test() {
}
这个Action有加载到 但是就是外部访问返回404
@At("/test/js1")
public void test() {
}
这样就可以外部访问到
是内部有什么机制么?
<init-param>
<param-name>ignore</param-name>
<param-value>^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|txt)$</param-value>
</init-param>
好吧,自己打脸了
楼主把 web.xml 贴一下看看
来自炫酷的 NutzCN
<filter>
<filter-name>nutz</filter-name>
<filter-class>org.nutz.mvc.NutFilter</filter-class>
<init-param>
<param-name>modules</param-name>
<param-value>com.freedom.demo.MainModule</param-value>
</init-param>
<init-param>
<param-name>exclusions</param-name>
<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,*.svg.*.eot,*.ttf,*.woff,/druid/*,/assets/plugins/fonts/*</param-value>
</init-param>
<init-param>
<param-name>ignore</param-name>
<param-value>^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|txt)$</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>nutz</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
分别把 exclusions 和 ignore 注释掉,然后访问看看。
来自炫酷的 NutzCN