这是web.xml,在我在智能J本地运行应用程序之后,我没有看到任何关于监听器加载的日志 并且它不会发送任何错误,但是当我通过http请求访问控制器时,我发现commonData类没有加载
这是web.xml,在我在智能J本地运行应用程序之后,我没有看到任何关于监听器加载的日志 并且它不会发送任何错误,但是当我通过http请求访问控制器时,我发现commonData类没有加载
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>aaa-qa</display-name>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.netease.cloud.aaa.utils.CommonData</listener-class>
</listener>
<filter>
<filter-name>webContextHolderPopulateFilter</filter-name>
<filter-class>com.netease.cloud.nce.filter.WebContextHolderPopulateFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>webContextHolderPopulateFilter</filter-name>
<servlet-name>mvc-dispatcher</servlet-name>
</filter-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<error-page>
<error-code>404</error-code>
<location>/404error</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500error</location>
</error-page>
<welcome-file-list>
<welcome-file></welcome-file>
</welcome-file-list>
</web-app>
以下是intelli J
中的控制台输出23, 2018 3:25:14 下午 org.apache.catalina.core.AprLifecycleListener init
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/sanqian/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
23, 2018 3:25:15 下午 org.apache.coyote.AbstractProtocol init
Initializing ProtocolHandler ["http-bio-8112"]
23, 2018 3:25:15 下午 org.apache.catalina.core.StandardService startInternal
Starting service Tomcat
23, 2018 3:25:15 下午 org.apache.catalina.core.StandardEngine startInternal
Starting Servlet Engine: Apache Tomcat/7.0.47
23, 2018 3:25:16 下午 org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
No global web.xml found
23, 2018 3:25:22 下午 org.apache.catalina.core.ApplicationContext log
No Spring WebApplicationInitializer types detected on classpath
23, 2018 3:25:22 下午 org.apache.catalina.core.ApplicationContext log
Set web app root system property: 'webapp.root' = [/Users/sanqian/nce/workspace/test-code/nce-containerized-test/src/main/webapp/]
23, 2018 3:25:22 下午 org.apache.catalina.core.ApplicationContext log
Initializing Spring root WebApplicationContext
23, 2018 3:25:24 下午 org.apache.catalina.core.ApplicationContext log
Initializing Spring FrameworkServlet 'mvc-dispatcher'
23, 2018 3:25:24 下午 org.apache.coyote.AbstractProtocol start
Starting ProtocolHandler ["http-bio-8112"]