October 2017
Intermediate to advanced
396 pages
10h 2m
English
As with Java, we have to declare a class as a Spring bean into Spring's XML-based configuration by using an element of the Spring-beans schema as a <bean> element. The <bean> element is the XML analogue to JavaConfig's @Bean annotation. We add the following configuration to the XML-based configuration file:
<bean id="transferService" class="com.packt.patterninspring.chapter4. bankapp.service.TransferServiceImpl"/>
<bean id="accountRepository" class="com.packt.patterninspring.chapter4. bankapp.repository.jdbc.JdbcAccountRepository"/>
<bean id="transferService" class="com.packt.patterninspring.chapter4. bankapp.repository.jdbc.JdbcTransferRepository"/>
In the preceding code, I have created a very simple ...
Read now
Unlock full access