GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - txazo/spring: Spring Framework Source Code Analysis

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
spring-framework
spring-framework
 
 
spring-mvc-test
spring-mvc-test
 
 
spring-test
spring-test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

spring

Spring Framework Source Code Analysis

说明

  • spring版本: 4.3.0.RELEASE
  • jdk版本: 1.8

包含的spring模块

  • spring-aop
  • spring-beans
  • spring-context
  • spring-core
  • spring-expression
  • spring-instrument

BeanFactory

  • DefaultListableBeanFactory

IOC容器BeanFactory初始化过程

  • Resource定位
  • 加载BeanDefinition
  • 注册BeanDefinition

ApplicationContext

  • ClassPathXmlApplicationContext

过程

  • XML -> Resource -> BeanDefinition -> BeanFactory

  • 注册BeanDefinition: DefaultBeanDefinitionDocumentReader.parseBeanDefinitions()

  • DefaultNamespaceHandlerResolver: Spring命名空间解析

context:annotation-config

  • AnnotationConfigBeanDefinitionParser
  • 注册 org.springframework.context.annotation.internalConfigurationAnnotationProcessor
  • 注册 org.springframework.context.annotation.internalAutowiredAnnotationProcessor
  • 注册 org.springframework.context.annotation.internalRequiredAnnotationProcessor
  • 注册 org.springframework.context.annotation.internalCommonAnnotationProcessor
  • 注册 org.springframework.context.event.internalEventListenerProcessor
  • 注册 org.springframework.context.event.internalEventListenerFactory

context:component-scan

  • ComponentScanBeanDefinitionParser

ioc注入

  • AbstractAutowireCapableBeanFactory.doCreateBean()
  • AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues()

xml的ioc注入

  • 读取bean的autowire配置, DefaultBeanDefinitionDocumentReader.getAutowireMode(), byName/byType
  • AbstractAutowireCapableBeanFactory.populateBean()
  • byName - autowireByName()
  • byType - autowireByType()

注解的ioc注入

About

Spring Framework Source Code Analysis

Resources

Readme
Apache-2.0 license
Activity

Stars

5 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.