Spring:The origin server did not find a current representation for the target resource or is not wil

记录一下惨烈的教训,花了一下午的时间调试

The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

在这里插入图片描述

因为

<context:component-scan base-package=“com”/>

作用扫描com包下的类带有特定的注解@Component,@Repository,@Service,@Controller,@Autowired就会将这个对象作为Bean注册进Spring容器

本该放在dispatcher-servlet下面的结果放在applicationContext下面了,哈哈哈

发布了124 篇原创文章 · 获赞 92 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_42146775/article/details/103168096