Rich Newman

XML Configuration File – Spring Java

<?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.xsd">
      <bean id="AndreiRublevMovie" class="moviefindertest.springxml.Movie">
            <constructor-arg name="title" value="Andrei Rublev"></constructor-arg>
            <constructor-arg name="director" value="Andrei Tarkovsky"></constructor-arg>
      </bean>
      <bean id="simpleMovieFinder" class="moviefindertest.springxml.SimpleMovieFinder"></bean>
      <bean id="simpleMovieLister" class="moviefindertest.springxml.MovieLister" scope="singleton">
            <constructor-arg name="finder" ref="simpleMovieFinder"></constructor-arg>
      </bean>
      
      <bean id="colonDelimitedMovieFinder" class="moviefindertest.springxml.ColonDelimitedMovieFinder"></bean>
      <bean id="colonDelimitedMovieLister" class="moviefindertest.springxml.MovieLister" scope="prototype">
            <property name="finder" ref="colonDelimitedMovieFinder"></property>
      </bean>
      
      <bean id="complexMovieListerBuilder" class="moviefindertest.springxml.ComplexMovieListerFactory"></bean>
      <bean id="complexMovieLister" factory-bean="complexMovieListerBuilder" factory-method="build" scope="prototype"></bean>
</beans>
 

Leave a Comment »

No comments yet.

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: