注解

1.@Controller:用于标注控制层组件

2.@Service:用于标注业务层组件 

3.@Repository:用于标注数据访问组件,即DAO组件

4.@EnableScheduling:开启对计划任务的支持

5.@Autowired:自动注入

6.@RequestMapping:地址映射

7.@Async:异步

8.@Value("${t1.msgname}"):注解获取*.porperties文件的内容

9.@RestController:相当于@ResponseBody + @Controller合在一起的作用。如果只是使用@RestController注解Controller,则Controller中的方法无法返回jsp页面

10.@ResponseBody:返回json对象

原文地址:https://www.cnblogs.com/-scl/p/7798945.html