spring mvc 配置运行报错误
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.0.14
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Sep 24 2014 09:01:51
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.0.14.0
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_67-b01
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
四月 06, 2015 10:51:18 上午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.4.8.
四月 06, 2015 10:51:18 上午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
四月 06, 2015 10:51:19 上午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.1h 5 Jun 2014)
四月 06, 2015 10:51:19 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
四月 06, 2015 10:51:19 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
四月 06, 2015 10:51:19 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1773 ms
四月 06, 2015 10:51:19 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
四月 06, 2015 10:51:19 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.14
四月 06, 2015 10:51:19 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\blog1
四月 06, 2015 10:51:24 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
四月 06, 2015 10:51:24 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
四月 06, 2015 10:51:38 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalAsyncAnnotationProcessor' defined in org.springframework.scheduling.annotation.ProxyAsyncConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor]: Factory method 'asyncAdvisor' threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:602)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:220)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1721)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor]: Factory method 'asyncAdvisor' threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:591)
... 27 more
Caused by: java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor(ProxyAsyncConfiguration.java:45)
at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerBySpringCGLIB$$f9c2cb54.CGLIB$asyncAdvisor$0(<generated>)
at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerBySpringCGLIB$$f9c2cb54$$FastClassBySpringCGLIB$$dac3d87d.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerBySpringCGLIB$$f9c2cb54.asyncAdvisor(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 28 more
四月 06, 2015 10:51:38 上午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
四月 06, 2015 10:51:38 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [183] milliseconds.
四月 06, 2015 10:51:39 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/blog1] startup failed due to previous errors
四月 06, 2015 10:51:39 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\blog1 has finished in 19,206 ms
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\docs
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\docs has finished in 51 ms
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\examples
四月 06, 2015 10:51:39 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
四月 06, 2015 10:51:39 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\examples has finished in 491 ms
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\host-manager
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\host-manager has finished in 34 ms
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\manager
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\manager has finished in 33 ms
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\ROOT
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\CUSTOM\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\ROOT has finished in 30 ms
四月 06, 2015 10:51:39 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
四月 06, 2015 10:51:39 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
四月 06, 2015 10:51:39 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 19920 ms
第一个错误在44行,看了半天,发现
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
">
<!-- 启动注解驱动的Spring MVC功能,注册请求url和注解POJO类方法的映射 -->
<mvc:annotation-driven />
<!-- 启动包扫描功能,以便注册带有@Controller、@Service、@repository、@Component等注解的类成为spring的bean,只有这样,程序中的注解才能发挥作用-->
<context:component-scan base-package="*" />
<!-- 对模型视图名称的解析,在请求时模型视图名称添加前后缀, -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/view/" p:suffix=".jsp" p:viewClass="org.springframework.web.servlet.view.JstlView"/> <!-- HandlerMapping:表示将请求的URL和Bean名字映射,如URL为 “上下文/hello”,则Spring配置文件必须有一个名字为“/hello”的Bean,上下文默认忽略。 -->
<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"></bean> <!-- HandlerAdapter部分,表示所有实现了org.springframework.web.servlet.mvc.Controller接口的Bean可以作为Spring Web MVC中的处理器。
如果需要其他类型的处理器可以通过实现HadlerAdapter来解决 -->
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"></bean> <bean name="/hello" class="springMVC.HelloWorldControl"></bean>
</beans>
这个spring-servlet.xml文件中13 and 15 行有问题,注释调就没事了
spring mvc 配置运行报错误的更多相关文章
- SpringMVC系列(十四)Spring MVC的运行流程
Spring MVC的运行流程图: 1.首先看能不能发送请求到Spring MVC的DispatcherServlet的url-pattern2.如果能发送请求,就看在Spring MVC中是否存在对 ...
- Tomcat配置和Spring MVC配置
Tomcat启动时,先找系统变量CATALINA_BASE,如果没有,则找CATALINA_HOME.然后找这个变量所指的目录下的conf文件夹,从中读取配置文件.最重要的配置文件:server.xm ...
- spring MVC配置详解
现在主流的Web MVC框架除了Struts这个主力 外,其次就是Spring MVC了,因此这也是作为一名程序员需要掌握的主流框架,框架选择多了,应对多变的需求和业务时,可实行的方案自然就多了.不过 ...
- Spring mvc 配置详解
现在主流的Web MVC框架除了Struts这个主力 外,其次就是Spring MVC了,因此这也是作为一名程序员需要掌握的主流框架,框架选择多了,应对多变的需求和业务时,可实行的方案自然就多了.不过 ...
- spring MVC配置详解(转)
现在主流的Web MVC框架除了Struts这个主力 外,其次就是Spring MVC了,因此这也是作为一名程序员需要掌握的主流框架,框架选择多了,应对多变的需求和业务时,可实行的方案自然就多了.不过 ...
- spring mvc 经常出现的错误
spring mvc 经常出现的错误 spring3.0 和jdk 1.8不是很兼容.有时候会出现一些错误 建议使用spring 4.0和jdk1.8搭配使用 书籍 spring mvc 学习指南上面 ...
- Spring MVC配置静态资源和资源包
Spring MVC配置静态资源和资源包 本例映射:css目录: pom.xml <properties> <spring.version>4.3.5.RELEASE</ ...
- 最小可用 Spring MVC 配置
[最小可用 Spring MVC 配置] 1.导入有概率用到的JAR包, -> pom.xml 的更佳实践 - 1.0 <- <project xmlns="http:// ...
- Spring MVC配置详解(3)
一.Spring MVC环境搭建:(Spring 2.5.6 + Hibernate 3.2.0) 1. jar包引入 Spring 2.5.6:spring.jar.spring-webmvc.ja ...
随机推荐
- IP达人启示录(学会经营自己:靠软件来扩大自己的IP,或者获取很大的名声)
在家附近的一个小公园中,一个老人每天晚上都在用水练习书法,他的字写的的确很不错,不懂书法的我,看了就感觉非常的带劲--苍劲有力.今晚再次路过的时候,就有种想和这个老人聊一聊的冲动,那么多年纪了,用书法 ...
- JS之RegExp对象(二)
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/zkn_CS_DN_2013/article/details/24243159 RegExp对象的经常 ...
- Genymotion设置网络桥接
1,打开Genymotion,找到对应的模拟器,点击“设置”按钮 2,在网络选项中选择桥接 Bridge
- java集合的关系
在 Java2中,有一套设计优良的接口和类组成了Java集合框架Collection,使程序员操作成批的数据或对象元素极为方便.这些接口和类有很多对抽象数据类型操作的API,而这是我们常用的且在数据结 ...
- bzoj1934: [Shoi2007]Vote 善意的投票&&bzoj2768:[JLOI2010]冠军调查
get到新姿势,最小割=最大流,来个大佬的PPT 这道题的做法是将st和1的xpy连,0的xpy和ed连,xpy之间jy连双向边,然后呢答案就是最小割. #include<cstdio> ...
- HDU - 1255 覆盖的面积(线段树求矩形面积交 扫描线+离散化)
链接:线段树求矩形面积并 扫描线+离散化 1.给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. 2.看完线段树求矩形面积并 的方法后,再看这题,求的是矩形面积交,类同. 求面积时,用被覆 ...
- HDU - 4333 Revolving Digits(拓展kmp+最小循环节)
1.给一个数字字符串s,可以把它的最后一个字符放到最前面变为另一个数字,直到又变为原来的s.求这个过程中比原来的数字小的.相等的.大的数字各有多少. 例如:字符串123,变换过程:123 -> ...
- 第十七周 Leetcode 403. Frog Jump(HARD) 线性dp
leetcode403 我们维护青蛙从某个石头上可以跳那些长度的距离即可 用平衡树维护. 总的复杂度O(n^2logn) class Solution { public: bool canCross( ...
- MQTT、CoAP
实时协议是物联网的一项根本性技术,在物联网领域发挥了重大的作用.目前物联网设备所广泛使用的四大实时协议:XMPP.HTTP.CoAP以及MQTT等可谓各擅所长.亦各有弊端. 那么在万物互联的时代,谁主 ...
- 二、Log4j基本使用方法
转自:https://blog.csdn.net/luohai859/article/details/52250807 Log4j由三个重要的组件构成:日志信息的优先级,日志信息的输出目的地,日志信息 ...