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

时间:2024-03-14 09:20:44

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

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

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

因为

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

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

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