Severe: Context initialization failed
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:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
At…
Solution: In springMVC.xml configuration file will < context:component-scan base-package=”*”/>
Change the path of your own project class files to: < context:component-scan base-package=”com.srpingmvc.*”>
— — — — — — — — — — — — — — — — — — — — to interpret the following — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Now let’s take a look at the SpringMVC.xml file to see why this is happening
< ?The XML version = “1.0” encoding = “utf-8”?>
< beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:context=”http://www.springframework.org/schema/context”
xsi:schemaLocation=”http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd “& gt;
< ! — Configure @Controller @service –>
< context:component-scan base-package=”com.springmvc.*”> < /context:component-scan>
< ! — View parser logical View, physical view –& GT;
< bean class= “org.springframework.web.servlet.view.InternalResourceViewResolver”>
< property name=”prefix” value=”/”> < /property>
< property name=”suffix” value= “.jsp”> < /property>
< /bean>
< /beans>
In the configuration file, base-package=”com.srpingmvc.*” means that all files under the com.springMVC folder will be scanned for the purpose of scanning
Register classes with specific annotations such as @Controller @Component # Repository and so on as beans in the Spring container.
The following is reproduced from: http://blog.csdn.net/zzjjiandan/article/details/22922847
The Spring configuration file is the “drawing” for directing the Spring factory to Bean production, dependency injection (assembly), and Bean instance distribution.
Java EE programmers must learn and flexibly apply this “drawing” to accurately express their “production intentions”.
The Spring configuration file is one or more standard XML documents. Applicationcontext.xml is the default configuration file for Spring.
When the container starts and cannot find the specified configuration document, an attempt is made to load the default configuration file.
The following is a relatively complete configuration file template. The basic purpose of each XML tag node in the document is also explained in detail.
These XML tag nodes will be used in the following knowledge points. After mastering the purpose of these XML nodes and attributes,
It provides a solid foundation for us to start writing configuration files.
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:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
At…
Solution: In springMVC.xml configuration file will < context:component-scan base-package=”*”/>
Change the path of your own project class files to: < context:component-scan base-package=”com.srpingmvc.*”>
— — — — — — — — — — — — — — — — — — — — to interpret the following — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Now let’s take a look at the SpringMVC.xml file to see why this is happening
< ?The XML version = “1.0” encoding = “utf-8”?>
< beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:context=”http://www.springframework.org/schema/context”
xsi:schemaLocation=”http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd “& gt;
< ! — Configure @Controller @service –>
< context:component-scan base-package=”com.springmvc.*”> < /context:component-scan>
< ! — View parser logical View, physical view –& GT;
< bean class= “org.springframework.web.servlet.view.InternalResourceViewResolver”>
< property name=”prefix” value=”/”> < /property>
< property name=”suffix” value= “.jsp”> < /property>
< /bean>
< /beans>
In the configuration file, base-package=”com.srpingmvc.*” means that all files under the com.springMVC folder will be scanned for the purpose of scanning
Register classes with specific annotations such as @Controller @Component # Repository and so on as beans in the Spring container.
The following is reproduced from: http://blog.csdn.net/zzjjiandan/article/details/22922847
The Spring configuration file is the “drawing” for directing the Spring factory to Bean production, dependency injection (assembly), and Bean instance distribution.
Java EE programmers must learn and flexibly apply this “drawing” to accurately express their “production intentions”.
The Spring configuration file is one or more standard XML documents. Applicationcontext.xml is the default configuration file for Spring.
When the container starts and cannot find the specified configuration document, an attempt is made to load the default configuration file.
The following is a relatively complete configuration file template. The basic purpose of each XML tag node in the document is also explained in detail.
These XML tag nodes will be used in the following knowledge points. After mastering the purpose of these XML nodes and attributes,
It provides a solid foundation for us to start writing configuration files.
Read More:
- [Solved] Tomcat Failed to Start Error: Server Tomcat v8.5 Server at localhost failed to start
- Error: (serious: a child container failed during start) (server component failed to start so Tomcat is unable)
- Server Tomcat v7.0 server at localhost failed to start
- Server Tomcat v8.0 Server at localhost failed to start.
- Start Tomcat and report error occurred during initialization of VM could not reserve enough space for object
- Initialization failed for ‘ https://start.spring.io terms of settlement
- A child container failed during start Tomcat error prompt
- tomcat Issues org.apache.catalina.LifecycleException: Failed to start component
- Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings.
- Tomcat — failed to start, flash back
- An error occurred when starting Tomcat in Eclipse: the sub container failed to start
- Tomcat service failed to start
- Could not publish server configuration for Tomcat v8.5 server at localhost
- Spring initializer error: initialization failed for ‘ https://start.spring.io ‘
- Maven failed to start component [standard engine [Tomcat] when using tomcat7 Maven plugin plug-in run
- Ubuntu failed to start sshd with an error: failed to start OpenBSD secure shell server
- Tomcat start error: severe: error listener start
- The Tomcat connector configured to listen on port 7014 failed to start
- Building Eureka_ Server error: application failed to start with classpath:file :/C:/ProgramFiles/Java/jdk
- Solution to Tomcat starting error listener start