其他分享
首页 > 其他分享> > Spring错误排查-No ServletContext set

Spring错误排查-No ServletContext set

作者:互联网

报错信息:

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

解决方法:在Spring不用开启webMvc的注解,这个注解交给 SpringMvcConfig这个配置类使用。

 

 

标签:lang,set,java,No,Spring,ServletContext,IllegalStateException
来源: https://www.cnblogs.com/liaoxiang/p/16341840.html