Spring 注解编程之模式注解

Spring 框架中有很多可用的注解,其中有一类注解称模式注解(Stereotype Annotations),包括 @Component, @Service,@Controller,@Repository 等。只要在相应的类上标注这些注解,就能成为 Spring 中组件(Bean)。 需要配置开启自动扫描。如在 XML 中配置 <context:component-scan base-packa
相关文章
相关标签/搜索