启用注解驱动mvc:annotation-driven时注意有多个不同的版本
当配置了mvc:annotation-driven后,Spring就知道了我们启用注解驱动。然后Spring通过context:component-scan标签的配置,会自动为我们将扫描到的**@Component**,@Controller,@Service,@Repository等注解标记的组件注册到工厂中,来处理我们的请求。
启用注解驱动mvc:annotation-driven时注意有多个不同的版本
当配置了mvc:annotation-driven后,Spring就知道了我们启用注解驱动。然后Spring通过context:component-scan标签的配置,会自动为我们将扫描到的**@Component**,@Controller,@Service,@Repository等注解标记的组件注册到工厂中,来处理我们的请求。