|
|
@ -24,9 +24,9 @@ public class IocHelper { |
|
|
|
for (Field beanField : beanFields) { |
|
|
|
for (Field beanField : beanFields) { |
|
|
|
if (beanField.isAnnotationPresent(Inject.class)) { |
|
|
|
if (beanField.isAnnotationPresent(Inject.class)) { |
|
|
|
Class beanFieldClass = beanField.getType(); |
|
|
|
Class beanFieldClass = beanField.getType(); |
|
|
|
Object beanfieldInstance = beanMap.get(beanFieldClass); |
|
|
|
Object beanFieldInstance = beanMap.get(beanFieldClass); |
|
|
|
if (beanfieldInstance != null) { |
|
|
|
if (beanFieldInstance != null) { |
|
|
|
ReflectionUtil.setField(beanInstance, beanField, beanfieldInstance); |
|
|
|
ReflectionUtil.setField(beanInstance, beanField, beanFieldInstance); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|