Spring
Java · 28 notes
- Spring Learning Resourceshistorical
Spring interview questions with detailed answers; how Spring resolves circular dependencies.
- 2.10 Spring Moduleshistorical
Spring core container, data access/integration, Web, AOP, Instrumentation, Test, and miscellaneous modules.
- ApplicationListenerhistorical
1. What ApplicationListener is 2. How to use the event-listener mechanism 3. References
- 2.32 Autowired Principlehistorical
Class inheritance diagram and principle analysis of Spring's AutowiredAnnotationBeanPostProcessor.
- Spring Transaction Source Analysishistorical
1. Enable transaction management. 2. TransactionManagementConfigurationSelector imports AutoProxyRegistrar and ProxyTransactionManagementConfiguration. 3. Study AutoProxyRegistrar. 4. Study ProxyTransactionManagementConfiguration and transaction interception.
- 2.47 Common Spring Annotationshistorical
Common Spring annotations and Aware interfaces, including Configuration, ComponentScan, Bean, Scope, Lazy, Conditional, Import, Value, Autowired, Qualifier, Primary, and Profile.
- Spring Transaction Propagationhistorical
1. What transaction propagation is. 1.1. Propagation behaviors including REQUIRED, SUPPORTS, MANDATORY, REQUIRES_NEW, NOT_SUPPORTED, and NEVER. 1.2. Notes. 2. References.
- 2.53 Usagehistorical
Create a project, configure pom.xml, and use Spring transactions with DbConfig, TestService, and TestDao.
- Circular Dependencieshistorical
1. What a circular dependency is 2. What problems it causes 3. How to solve it 4. References
- 1. Create the Spring Containerhistorical
1. Code to analyze 2. Create ApplicationContext and trace the refresh process
- 2. Call BeanFactoryPostProcessor's postProcess Methodhistorical
1. Code to study 2. Process BeanDefinitionRegistryPostProcessors 3. Process BeanFactoryPostProcessors
- 3. Register BeanPostProcessorhistorical
1. Code to study 2. Obtain BeanPostProcessors 3. Classify them 4-7. Register each group
- Spring IoC Source: Instantiating All Non-Lazy Singleton Beanshistorical
Source tracing of finishBeanFactoryInitialization and preInstantiateSingletons through getBean, singleton lookup and creation, BeanPostProcessors, bean instantiation, property population, initialization, proxy creation, and destruction registration.
- 1. Inject AspectJAnnotationAutoProxyCreator into the Containerhistorical
Enable AOP, register AspectJAnnotationAutoProxyCreator, and trace when ImportBeanDefinitionRegistrar.registerBeanDefinitions is called
- 2.1 How the AnnotationAwareAspectJAutoProxyCreator Bean Instance Is Createdhistorical
Class hierarchy, call-stack analysis, BeanFactoryAware setBeanFactory, registration and initialization of AnnotationAwareAspectJAutoProxyCreator
- Spring AOP Source Analysis Summaryhistorical
Created on Monday, July 22, 2019. Source analysis of Spring AOP from @EnableAspectJAutoProxy through auto-proxy creation and target-method interceptor execution.
- 2.2 When Does AnnotationAwareAspectJAutoProxyCreator Take Effect?historical
Trace postProcessBeforeInstantiation and postProcessAfterInitialization while creating singleton Beans
- 2.3 How AnnotationAwareAspectJAutoProxyCreator Creates Proxy Objectshistorical
Trace to postProcessBeforeInstantiation, determine whether a proxy is needed, wrap the Bean with advisors, and create JDK/CGLIB proxies
- 2.4 How the Target Method Is Executedhistorical
Invoke Calc.div, enter the proxy intercept method, build the interceptor chain, and execute interceptors plus the target method