我正在尝试在我的工作网络应用程序中实现 LESS CSS。Wro4j 使用此处提供的默认设置:http: //alexo.github.com/wro4j/
但是将 init-params 添加到此处提供的过滤器中:http ://code.google.com/p/wro4j/wiki/LessCssSupport确实 1. 由于 url 未知而遇到异常(只有 uri,所以我改为 uri) 2.打开localhost:8080/template/res/all.css时遇到404
这是必要的代码:
<!-- Wro4j Filter -->
<filter>
<filter-name>WebResourceOptimizer</filter-name>
<filter-class>ro.isdc.wro.http.WroFilter</filter-class>
<init-param>
<param-name>configuration</param-name>
<param-value>DEPLOYMENT</param-value>
</init-param>
<init-param>
<param-name>managerFactoryClassName</param-name>
<param-value>ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory</param-value>
</init-param>
<init-param>
<param-name>uriLocators</param-name>
<param-value>servletContext,classpath,uri</param-value>
</init-param>
<init-param>
<param-name>preProcessors</param-name>
<param-value>cssUrlRewriting,cssImport,bomStripper,semicolonAppender,lessCss</param-value>
</init-param>
<init-param>
<param-name>postProcessors</param-name>
<param-value>cssVariables,cssMinJawr,jsMin</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>WebResourceOptimizer</filter-name>
<url-pattern>/res/*</url-pattern>
</filter-mapping>
wro.xml:
<?xml version="1.0" encoding="UTF-8"?>
<groups xmlns="http://www.isdc.ro/wro">
<group name="all">
<css>/resources/styles/reset.css</css>
<css>/resources/styles/*.less</css>
<js>/resources/scripts/*.js</js>
</group>
</groups>
更新
调试信息: http: //nopaste.me/raw/11966466624ff5e201716e0.txt
刚刚删除bomStripper
,它的工作原理!