Error creating bean with name ‘resourceHandlerMapping‘ defined in class path resource [orgspringfra

Error creating bean with name ‘resourceHandlerMapping‘ defined in class path resource [orgspringfra,第1张

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配置类导致的,可以通过包扫描范围解决。

菜鸡程序员,错了勿喷。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/870134.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存