Skip to content

Commit 8512047

Browse files
committed
Notes taking spring-projects#1
1 parent 085cb1d commit 8512047

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ private InjectionMetadata buildAutowiringMetadata(final Class<?> clazz) {
456456

457457
ReflectionUtils.doWithLocalFields(targetClass, field -> {
458458
MergedAnnotation<?> ann = findAutowiredAnnotation(field);
459+
// The place where they find out the annotation of the field
459460
if (ann != null) {
460461
if (Modifier.isStatic(field.getModifiers())) {
461462
if (logger.isInfoEnabled()) {

spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
* @see org.springframework.beans.factory.config.ConfigurableListableBeanFactory
6060
* @see org.springframework.context.ApplicationContext#getAutowireCapableBeanFactory()
6161
*/
62+
// This is where you do autowiring
6263
public interface AutowireCapableBeanFactory extends BeanFactory {
6364

6465
/**

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ protected ParameterNameDiscoverer getParameterNameDiscoverer() {
233233
* between your beans. Refactor your application logic to have the two beans
234234
* involved delegate to a third bean that encapsulates their common logic.
235235
*/
236+
// Places where spring deal with circular dependencies
236237
public void setAllowCircularReferences(boolean allowCircularReferences) {
237238
this.allowCircularReferences = allowCircularReferences;
238239
}

spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ protected boolean hasDependentBean(String beanName) {
462462
* @param beanName the name of the bean
463463
* @return the array of dependent bean names, or an empty array if none
464464
*/
465+
// Check for your dependent bean here
465466
public String[] getDependentBeans(String beanName) {
466467
Set<String> dependentBeans = this.dependentBeanMap.get(beanName);
467468
if (dependentBeans == null) {

0 commit comments

Comments
 (0)