解决
[INFO] Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0’异常
解决办法:检查applicationContext.xml和springmvc.xml的扫描的包(base-package的值)是否写错对应的包名加类名。
applicationContext.xml片段
<context:component-scan base-package=“p2p.wxl”>
<context:exclude-filter type=“annotation” expression=“org.springframework.stereotype.Service”/>
<context:exclude-filter type=“annotation” expression=“org.springframework.stereotype.Controller”/>
<context:exclude-filter type=“annotation” expression=“org.springframework.web.bind.annotation.ControllerAdvice”/>
</context:component-scan>
springmvc.xml片段
<context:component-scan base-package=“p2p.wxl” use-default-filters=“false”>
<context:include-filter type=“annotation” expression=“org.springframework.stereotype.Service”/>
<context:include-filter type=“annotation” expression=“org.springframework.stereotype.Controller”/>
<context:include-filter type=“annotation” expression=“org.springframework.web.bind.annotation.ControllerAdvice”/>
</context:component-scan>
解决[INFO] Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServlet
最新推荐文章于 2022-10-22 21:31:30 发布