Java 如何将JAWR 3.7库与IntelliJ一起使用?(在Eclipse中,它工作,但在IntelliJ中显示错误)

Java 如何将JAWR 3.7库与IntelliJ一起使用?(在Eclipse中,它工作,但在IntelliJ中显示错误),java,eclipse,jsp,intellij-idea,jawr,Java,Eclipse,Jsp,Intellij Idea,Jawr,我们使用3.7库进行捆绑和缩小。 我们的web服务器是Apache8.0.26 当我们在Eclipse4.5中运行项目时,运行没有任何问题,但是 使用intellij作为IDE并运行它 我们看到这个错误 异常详细信息: 代码详细信息: jawr.properties: 启动类: Web.config: index.jsp: 为什么我们的代码在ECLIPSE上工作,但在IntelliJ中出错 似乎所有配置、代码、web服务器。。。同样地,jawr在启动时似乎没有初始化。请显示您的启动日志。看

我们使用3.7库进行捆绑和缩小。 我们的web服务器是Apache8.0.26

当我们在Eclipse4.5中运行项目时,运行没有任何问题,但是 使用intellij作为IDE并运行它

我们看到这个错误

异常详细信息:

代码详细信息:

jawr.properties:

启动类:

Web.config:

index.jsp:


为什么我们的代码在ECLIPSE上工作,但在IntelliJ中出错


似乎所有配置、代码、web服务器。。。同样地,jawr在启动时似乎没有初始化。请显示您的启动日志。看起来jawr在启动时没有初始化。请显示您的启动日志。
# Common properties

jawr.debug.on=false
jawr.gzip.on=true
jawr.gzip.ie6.on=false
jawr.charset.name=UTF-8

jawr.css.bundle.all.id=/content/css/all.css
jawr.css.bundle.all.mappings=/WEB-INF/Resources/css/bootstrap.css\
  ,/WEB-INF/Resources/css/alertify/alertify_core.css\
  ,/WEB-INF/Resources/css/alertify/alertify_bootstrap.css

jawr.css.bundle.mine.id=/content/css/myall.css
jawr.css.bundle.mine.mappings=/WEB-INF/Resources/css/all2.css

jawr.js.bundle.jquery.id=/content/js/jquery.js
jawr.js.bundle.jquery.mappings=\
  /WEB-INF/Resources/js/jquery-2.0.3.js\
  ,/WEB-INF/Resources/js/bootstrap.js\
  ,/WEB-INF/Resources/js/alertify/alertify.js\
  ,/WEB-INF/Resources/js/jquery.ui.widget.js\
  ,/WEB-INF/Resources/js/jquery.fileupload.js\

jawr.js.bundle.angular.id=/content/js/angular.js
jawr.js.bundle.angular.mappings=/WEB-INF/Resources/js/angular.js\
  ,/WEB-INF/Resources/js/angular-resource.js\
  ,/WEB-INF/Resources/js/angular-route.js\
  ,/WEB-INF/Resources/js/angular-animate.js\
  ,/WEB-INF/Resources/js/angular-touch.js


jawr.js.bundle.app.id=/content/js/app.js
jawr.js.bundle.app.mappings=/WEB-INF/Resources/js/app/app.js\
  ,/WEB-INF/Resources/js/app/globalController.js\
  ,/WEB-INF/Resources/js/app/defaultController.js\
  ,/WEB-INF/Resources/js/app/customerController.js\
  ,/WEB-INF/Resources/js/app/jewelleryController.js\
  ,/WEB-INF/Resources/js/app/orderController.js\
  ,/WEB-INF/Resources/js/sg/sg-all.js
public class Startup implements WebApplicationInitializer {


    public void onStartup(ServletContext servletContext) throws ServletException {

        WebApplicationContext context = this.getContext();

        ContextLoaderListener listener = new ContextLoaderListener(context);
        servletContext.addListener(listener);

        ServletRegistration.Dynamic dispatcherServlet = servletContext.addServlet("dispatcherServlet", new DispatcherServlet(context));
        dispatcherServlet.setLoadOnStartup(1);
        dispatcherServlet.addMapping("/");


        ServletRegistration.Dynamic javascriptServlet = servletContext.addServlet("javascriptServlet" , new JawrServlet());
        javascriptServlet.setInitParameter("configLocation", "org/risman/config/jawr.properties");
        javascriptServlet.setInitParameter("type", JawrConstant.JS_TYPE);
        javascriptServlet.setLoadOnStartup(1);
        javascriptServlet.addMapping("*.js");

        ServletRegistration.Dynamic styleServlet = servletContext.addServlet("styleServlet" , new JawrServlet());
        styleServlet.setInitParameter("configLocation", "org/risman/config/jawr.properties");
        styleServlet.setInitParameter("type", JawrConstant.CSS_TYPE);
        styleServlet.setLoadOnStartup(1);
        styleServlet.addMapping("*.css");

    }


    private WebApplicationContext getContext() {

        AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();


        context.register(WebConfig.class);

        return context;

    }

}
@Configuration
@EnableWebMvc
@ComponentScan( basePackages= {"org.risman.controller" })//, "org.risman.repository" , "org.risman.service"} )
public class WebConfig extends WebMvcConfigurerAdapter {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/res/**").addResourceLocations("/WEB-INF/Resources/")
                .resourceChain(true).addResolver(new GzipResourceResolver());

    }

    @Bean
    public ViewResolver viewResolver(){

        InternalResourceViewResolver resolver = new InternalResourceViewResolver();

        resolver.setSuffix(".jsp");
        resolver.setPrefix("/WEB-INF/Views/");

        return resolver;

    }

}
<head>

    <%@ taglib prefix="jw" uri="http://jawr.net/tags" %>
    <%--<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>--%>


    <jw:style src="/content/css/all.css" useRandomParam="false"></jw:style>
    <jw:style src="/content/css/myall.css" useRandomParam="false"></jw:style>

    <jw:script src="/content/js/jquery.js" useRandomParam="false" async="false"></jw:script>
    <jw:script src="/content/js/angular.js" useRandomParam="false" async="false"></jw:script>
    <jw:script src="/content/js/app.js" useRandomParam="false" async="false"></jw:script>


    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width"/>