1.SpringBoot/spring
@SpringBootApplication:
包含@Configuration、@EnableAutoConfiguration、@ComponentScan通常用在主类上。
@Repository:
用于标注数据访问组件,即DAO组件。
@Service:
用于标注业务层组件。
@RestController:
用于标注控制层组件(如struts中的action),包含@Controller和@ResponseBody
@Controller:
用于标注是控制层组件,需要返回页面时请用@Controller而不是@RestController
@Component:
泛指组件,当组件不好归类的时候,我们可以使用这个注解进行标注。