SpringMVC配置问题

郏高阳 发布于 2013/12/10 13:42
阅读 285
收藏 1

Spring注解+配置启动非常慢如何处理?启动约30分钟,目前改成值扫描注解Controller别的注解全部去掉启动约30秒……不知道为什么?

加载中
0
Ryan-瑞恩
Ryan-瑞恩
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
郏高阳
郏高阳
jar包我都引入了!
0
lock_free
lock_free

web.xml

<listener>

        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
0
夕拾贰
夕拾贰
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<display-name>test-web</display-name>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<filter>
		<filter-name>encodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- Spring MVC -->
	<servlet>
		<servlet-name>springServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/spring-mvc.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>springServlet</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

</web-app>



返回顶部
顶部