Spring5 源码阅读环境搭建

这一阵子在读spring源码,但是网上的文章,构建spring源码大都有问题,导致我构建源码的时候出现了很多问题,所以我自己重新构建了一下。...

2024-02-21 · 3 min · 1022 words · luolin

Springboot事务管理看这篇就够了

问题背景 [[记一次事务的坑:Transaction rolled back because it has been marked as rollback-only]] 源码分析 @Nullable protected Object invokeWithinTransaction(Method method, @Nullable Class<?> targetClass, final InvocationCallback invocation) throws Throwable { // If the transaction attribute is null, the method is non-transactional. TransactionAttributeSource tas = getTransactionAttributeSource(); final TransactionAttribute txAttr...

2024-02-21 · 3 min · 1054 words · luolin

SpringBoot事务自定义提交后执行

背景 在SpringBoot通常会使用到事务注解快速启动一个事务,但是在一个大型项目中,往往会存在一些流程上的逻辑需要在事务提交之后新启一个方...

2024-02-21 · 2 min · 983 words · luolin

SpringBoot异步线程

线程池参数含义: corePoolSize:核心线程数 核心线程会一直存活,及时没有任务需要执行 当线程数小于核心线程数时,即使有线程空闲,线程池...

2024-02-21 · 2 min · 739 words · luolin

SpringCloud搭建

SpringCloud简介 Spring Cloud是一系列框架的有序集合。它利用SpringBoot的开发便利性巧妙地简化了分布式系统基础设施的开发,如...

2024-02-21 · 8 min · 3612 words · luolin