Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is 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
这个问题是spring整合时出现,由于springconfig配置类意外扫描springMvcConfig配置类导致的,可以通过包扫描范围解决。
菜鸡程序员,错了勿喷。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)