BAEL-3290: Added unit test for autowiring by type

This commit is contained in:
Justin Albano
2019-12-10 08:35:09 -05:00
parent a96ad15223
commit 49b511d74a
4 changed files with 59 additions and 2 deletions
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- Autowired injection -->
<bean id="item" class="org.baeldung.store.ItemImpl1" />
<bean id="xml-store-by-autowire-type" class="org.baeldung.store.Store" autowire="byType">
</bean>
</beans>
+3 -2
View File
@@ -18,9 +18,10 @@
</bean>
<!-- Autowired injection -->
<bean id="item" class="org.baeldung.store.ItemImpl1" />
<bean id="xml-store-by-autowire" class="org.baeldung.store.Store" autowire="byName">
<bean id="xml-store-by-autowire-name" class="org.baeldung.store.Store" autowire="byName">
</bean>
<!-- Lazy instantiation -->