1、@RestController ,相当于@Controller+@ResponseBody,@RestController可以自动将对象转换为json格式,@Controller可以返回对应的jsp或者html页面
2、@SpringBootApplication,相当于@EnableAutoConfiguration、@SpringBootConfiguration、@ComponentScan三个注解的整合。@EnableAutoConfiguration作用是自动添加spring所需要的依赖,@SpringBootConfiguration作用是声明当前类是一个配置类,@ComponentScan作用是扫描包,扫描同级及子孙级包。
3、devtools,自动编译,热启动工具。
4、@Value,读取配置文件内的数据。
5、@Data,需要引入lombok插件,并且在配置文件中引入lombok依赖。作用是自动生成get和set方法,lombok还自带一个@slf4j的日志系统,
6、@Transactional,事务管理
7、@ConfigurationProperties,需要引入configuration-processor依赖 ,@Component和@ConfigurationProperties(prefix="配置文件内的名称")
8、@Async,异步调用方法,启动上添加@EnableAsync,在需要执行的方法上加上@Async,@Async()括号内可以加线程池名称,创建线程池名称以后就不再无限创建线程了,可以节省性能