1. 问题
在使用注解开发,SpringMvc配置类中开启@EnableWebMvc,如果在springConfig类中使用@Component扫描Bean对象扫描到spring和springMvc的配置Bean对象(@Configuration标注的Bean对象)就会出现No Servlet Set错误。
在使用注解开发,SpringMvc配置类中开启@EnableWebMvc,如果在springConfig类中使用@Component扫描Bean对象扫描到spring和springMvc的配置Bean对象(@Configuration标注的Bean对象)就会出现No Servlet Set错误。