自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (15)
  • 收藏
  • 关注

原创 Spring Boot源码 - @ConditionalOnBean实现分析

在上一篇@Conditional之后,知道了动态判断注册bean的是怎么实现的。执行的时机,回调时传入了什么对象,只是在Spring BootCondition下面会有很多更复杂的情况,所以就使用比较常见的@ConditionalOnBean为例,分析其结构和回调的逻辑。@Target({ ElementType.TYPE, ElementType.METHOD })@Retention(RetentionPolicy.RUNTIME)@Documented@Conditional...

2020-06-30 22:29:12 1500

原创 Spring源码 - @Conditional实现分析

@Conditional是Spring 4出现的注解,但是真正露出价值的是Spring Boot的扩展@ConditionalOnBean等。但是任然使用的是Spring框架进行处理,并没有做太多定制的东西,所以还是先看看@Conditional注解的实现。@Target({ElementType.TYPE, ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface Con...

2020-06-28 23:46:21 693

原创 Spring Boot源码(六) - 自动装配(下)- AutoConfigurationImportSelector

继续上一篇,知道了执行时机和调用顺序,继续分析两个方法的逻辑,是怎样实现自动装配的。AutoConfigurationImportSelector.AutoConfigurationGroup1、process@Overridepublic void process(AnnotationMetadata annotationMetadata, DeferredImportSelector deferredImportSelector) { // 断言判断,肯定为true ...

2020-06-26 14:38:51 2548

原创 Spring源码 - DeferredImportSelector实现分析

在分析DeferredImportSelector之前,根据名字Deferred(延迟的)ImportSelector。ImportSelector则是将selectImports返回的字符串数组,注册成为Bean,详细过程可以参见:Spring源码-ImportSelector实现分析。那么有几个问题:1)、怎么延迟的;2)、执行时机,或者在什莫时候被调用的;3)、返回后的字符串数组,怎么注册成Bean(或者Beandefinition)。 之前在分析Spring源码时,并没有分析D...

2020-06-26 09:57:41 3463 1

原创 Spring Boot源码(五) - 自动装配(上)

按照SpringApplication的run方法执行流程,在refreshContext时候会调用refresh方法,其中会在ConfigurationClassPostProcessor中处理@Import,ImportSelector等(详细可以参见:SpringIoc源码(十)- ApplicationContext(六)- refresh(ConfigurationClassPostProcessor上)或Spring源码-ImportSelector实现分析)。而自动装配则是通过@...

2020-06-24 20:33:13 682

原创 Spring Boot源码(四) - prepareEnvironment、反射创建ApplicationContext对象、prepareContext

目录一、Environment初始化二、反射创建ApplicationContext对象// 将main方法的args参数进行封装ApplicationArguments applicationArguments = new DefaultApplicationArguments(args);// 准备EnvironmentConfigurableEnvironment environment = prepareEnvironment(listeners, applicationArgu

2020-06-22 22:10:11 752

原创 Spring Boot源码(三) - SpringApplicationRunListener(EventPublishingRunListener)生命周期和回调时机

Spring Boot定义的SpringApplicationRunListener实现类只有EventPublishingRunListener,主要是定义了其生命周期,并且在Spring Boot启动过程中完成回调。

2020-06-20 21:37:14 2161

原创 Spring Boot源码(二) - SpringApplication的run方法

Spring Boot在执行SpringApplication的run方法之前,其实在构造函数中已经完成了很多初始化的准备操作,并且在run方法之前我们可以配置很多信息(上一篇博客中分析了很多的字段都是有Setter的)。比如我们可以将代码写作如下:

2020-06-20 13:04:31 1248

原创 Spring Boot源码(一) - 分析总览

Spring Boot当前版本为2.2.0,之前一直对Spring Boot的各个模块比较模糊,很难理解自动装配等注解与容器启动的关系等。还是先看一下,Spring Boot的特点:1、2、3、4、5、6、

2020-06-18 22:45:54 382

Jenkins的rpm包

jenkins的rpm包,用于centos下安装jenkins。jenkins的rpm包,用于centos下安装jenkins。

2018-06-26

springboot swagger2 demo

OpenAPI 规范3 , springboot swagger2 demo ,主要是方便自己后面使用。

2017-12-17

gui-反编译

反编译

2017-08-02

renren-generator

renren-generator快速开发平台

2017-07-10

renren-fastplus

renren-fastplus快速开发平台

2017-07-10

renren-fast

**项目说明** - renren-fast是一个轻量级的Java快速开发平台,能快速开发项目并交付

2017-07-10

jeesite_hibernate

快熟开发java web项目

2017-06-13

jeesite_mybatis

快熟开发java web项目

2017-06-13

FileZilla工具

FileZilla

2017-06-12

Xshell工具

Xshell工具

2017-06-12

Xftp文件上传

Xftp

2017-06-12

firebug断点调试

断点调试

2017-05-23

eclipse的反编译插件

个人使用最好的反编译插件,就按照一般的eclipse插件进行安装即可

2017-05-14

Postman离线安装包

Postman离线安装包

2017-05-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除