Spring configuration first example
Resource of spring core module Applications are used 1 Spring interface. 2 Spring bean class. 3 Spring- configuration file. 4 Client Applications All the spring releted jar files put in lib folder directory structure is same as normal java/j2ee applications. Demo.xml
1 2 3 4 5 6 7 8 9 10 | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="demo" class="s1.DemoInterImpl" > <property name="message"> <value>hello</value> </property> </bean> </beans> |
This example is setter base dependency injection this xml file is spring configuration … Read more