Book
关于
标签
分类
读书笔记
人性的枷锁
酒国
消息队列
kafka
rocketmq
rabbitmq
redis
Spring
控制反转(IOC)/依赖注入(DI)
ApplicationContext 容器
SSM 框架整合
Spring Boot
应用上下文配置类(ConfigurableApplicationContext)
核心注解(@SpringBootApplication)
自动配置类加载(@EnableAutoConfiguration)
自动导入包(@AutoConfigurationPackage)
类导入(@Import)
条件导入(@Conditional)
全局配置(application.properties)
多环境配置切换
属性加密
日志配置
属性松散绑定规则
全局配置属性注入
逐个注入(@Value)
批量注入(@ConfigurationProperties @EnableConfigurationProperties)
请求拦截(HandlerInterceptor & Filter & @WebFilter)
前后端数据交互对接
全局响应体处理器(ResponseBodyAdvice)
取消封装
响应体空值处理
全局异常处理类
事务
TransactionManager 事务管理器
事务属性
事务状态
声明式事务(xml & 注解)
配置xml方式
创建事务管理器
使用注解方式(@Transactional)
环绕通知使用事务(@Around)
编程式事务(TransactionTemplate & PlatformTransactionManager)
面试题
1.Java基础面试题
2.Spring 面试题
3.数据库面试题
4.中间件面试题
5.运维面试题
6.场景题
7.算法题
大语言模型
运维
软件测评
开源测评
系统设计最佳实践
QA
安装部署
日志配置
日志等级控制 在Spring 全局配置文件中,可以分别对具体的包名设置日志等级 示例 #根据包名设置权限 logging: level: root: info com.example.service: debug com.example.controller: debug com.example.dao: debug 示例 #根据分组设置权限 logging: ...
2022-09-28
Spring Boot
属性加密
配置文件中往往含有比较敏感的信息,例如,数据库密码,这些数据一旦泄露有可能造成严重的后果 Jasypt(Java Simplified Encryption),一个用于加密的Java类库,目的就是让开发者很简便的将加密功能引入自己的项目中来,而不需要去明白具体的加密知识,其有如下特点: ...
2022-09-28
Spring Boot
多环境配置切换
我们一般都会有多个应用环境,开发环境、测试环境、生产环境,各个环境的配置会略有不同,我可以根据这个创建多份配置文件,由主配置文件来控制读取特定的子配置 创建子配置文件,格式application-xxx.[properties / yml / yaml] 或 在主配置文件中指定 ...
2022-09-28
Spring Boot
全局配置(application.properties)
Spring Boot使用一个application.properties或者application.yaml(application.yml)的文件作为全局配置文件,两种配置方式属性相同,只是格式不同 我们可以在application.properties文件中定义Spring Boot项目的相关属性,当然,这些相关属性可以是系 ...
2022-09-28
Spring Boot
条件导入(@Conditional)
@Conditional注解可以根据代码中设置的条件装载不同的bean,符合条件则加载该bean,不符合则不加载该bean 参数 描述 ...
2022-09-28
Spring Boot
类导入(@Import)
@Import注解的作用是把类加入Spring IOC容器。 Spring Boot 有多种方式能让类加IOC容器管理,如@Bean、@Component等,@Import是另外一种方式,更加快捷 参数 ...
2022-09-28
Spring Boot
自动导入包(@AutoConfigurationPackage)
@AutoConfigurationPackage的作用就是给容器中导入某个包中全部组件类注册到Spring Boot中的容器中 @AutoConfigurationPackage注解的功能是由@Import注解封装实现的,不用对每个类单独添加 @Import,直接引入包路径更方便 示例 ...
2022-09-28
Spring Boot
自动配置类加载(@EnableAutoConfiguration)
@EnableAutoConfiguration用于类或接口上,当spring boot扫描到@EnableAutoConfiguration注解时则会将spring-boot-autoconfigure.jar/META-INF/spring.factories文件中org.springframework.boot.autoconfigure.EnableAutoConfigurati ...
2022-09-28
Spring Boot
核心注解(@SpringBootApplication)
@SpringBootApplication是Sprnig Boot项目的核心注解,目的是开启自动配置,之前用户使用的是3个注解注解他们的main类。分别是@Configuration,@EnableAutoConfiguration,@ComponentScan。 由于这些注解一般都是一起使用,spring boot提供了一个统一的注解@SpringBootA ...
2022-09-28
Spring Boot
应用上下文配置类(ConfigurableApplicationContext)
在Spring Boot中 ConfigurableApplicationContext 继承了 ApplicationContext 和 Lifecyle 、Closeable接口 ApplicationContext是Spring中的应用上下文 Lifecycle 接口则是负责对 ...
2022-09-28
Spring Boot
<
1
2
3
>