Bug 信息
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerMapping]: Factory method ‘resourceHandlerMapping’ threw exception; nested exception is java.lang.IllegalStateException: No ServletContext set
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.lang.IllegalStateException: No ServletContext set
相关文件
SpringConfig.java
@Configuration
@ComponentScan(basePackages = "com.xxx", excludeFilters = @ComponentScan.Filter(
type= FilterType.ANNOTATION, classes= Controller.class))
@PropertySource({
"classpath:jdbc.properties", "classpath:log4j.properties"})