SpringBoot系列笔记目录【注解总结】
前言
本学习笔记重点记录SpringBoot常用注解的含义、使用方法与作用等。
目录中带星号*的注解为前面出现过或前文有类似
在说明注解时,第一点加粗为注解中文含义,第二点为一般加在哪身上,缩进或代码块为示例,如:
@注解
- 中文含义
- 加在哪
- 其他……
语句示例
//代码示例
目录施工中,仅供参考。
1. 全注解下的Spring基础
- 1.1 SpringBoot简介
- 1.2 全注解下的Spring IoC
- @Repository、@Service、@Controller、@RestController、@Component、@Bean
- @ComponentScan、@Import、@Conditional
- @Autowired、@Primary、@Quelifier
- @Value、@ConfigurationProperties、@PropertySource
- @Scope、@Profile、@ImportResources
- 1.3 约定编程Spring AOP
- @Transactional、@Aspect、@Order、@Pointcut
- @Before、@AfterReturning、@After、@AfterThrowing、@Around
- @DeclareParents
- 1.4 数据库事务处理
- @Transactional
2. SpringBoot核心思想
-
- *@ImportResource、@ConfigurationProperties、@EnableConfigurationProperties
- @SpringBootApplication
- @SpringBootConfiguration、@ComponentScan、@EnableAutoConfiguration
- @AutoConfigurationPackage、*@ConditionalOnMissingBean
-
用户配置了就按用户,用户没配置就按默认
-
事先定义很多个适配器,逐一判断匹配
-
SpringBoot整合第三方技术的两种方式:自定义与starter
3. 数据访问
- 3.1 配置数据源及JDBC
- 3.2 整合MyBatis
- @Mapper、@MapperScan
- @Select、@Insert、@Options
- 3.3 整合MyBatis-Plugs
- @TableName(“数据库名”)
- 整合Redis
- 整合MongoDB
4. Web开发
- 4.1 SpringMVC的自动配置
- 设置静态页面
- 请求参数处理/REST风格
- 数据响应与内容协商
- 视图解析与模板引擎Thymeleaf
- 拦截器
- 文件上传
- 异常处理
- Web原生组件注入(Servlet、Filter、Listener)
- 嵌入式Servlet容器
5. 安全开发
6. 部署、测试与监控
- 部署
- 单元测试
- 指标监控
7. 分布式开发【过渡】
- 从SpringBoot到SpringCloud
最后
