springboot中约定大于配置
1 @SpringBootApplication springboot的入口
2 @EnableConfigurationProperties 注入配置类 和@ConfigurationProperties 结合使用
3 @SpringBootTest 测试入口
4 @RunWith(SpringRunner.class)测试环境
5 @Transactional开启事务
6 @ActiveProfiles(“dev”) 指定加载的配置文件
6 @RestController 控制器
7 @RequestMapping 请求路径
8 @Autowired 自动注入
9 @JsonView 指定返回的json数据
10 @Import 导入某个类 在这个类没有控制翻转的前提下
11 @Repository
12 @Service
13 @PropertySource 加载配置文件 与Environment结合使用
14 @Slf4j 启动日志
15 @EnableWebMvc