<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-autowire="byType">
	<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
		<description>Grails application factory bean</description>
		<property name="groovyFiles">
			<value>file:test/web/org/codehaus/groovy/grails/web/servlet/mvc/*.groovy</value>
		</property>
	</bean>
	<bean id="controller" class="org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController">
		<description>Grails controller to handle simple or plain old controllers</description>
	</bean>
	<bean id="controllerClass" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" abstract="true">
		<property name="targetObject">
			<ref bean="grailsApplication"/>
		</property>
		<property name="targetMethod">
			<value>getController</value>
		</property>
	</bean>
	<bean id="testControllerClass" parent="controllerClass">
		<property name="arguments">
			<value>TestController</value>
		</property>
	</bean>
	<bean id="TestController" factory-bean="testControllerClass" factory-method="newInstance"/>
	<bean id="simpleControllerClass" parent="controllerClass">
		<property name="arguments">
			<value>SimpleController</value>
		</property>
	</bean>
	<bean id="SimpleController" factory-bean="simpleControllerClass" factory-method="newInstance"/>
	<bean id="returnModelAndViewControllerClass" parent="controllerClass">
		<property name="arguments">
			<value>org.codehaus.groovy.grails.web.servlet.mvc.ReturnModelAndViewController</value>
		</property>
	</bean>
	<bean id="org.codehaus.groovy.grails.web.servlet.mvc.ReturnModelAndViewController" 
		factory-bean="returnModelAndViewControllerClass" factory-method="newInstance"/>
	<bean id="parameterControllerClass" parent="controllerClass">
		<property name="arguments">
			<value>ParameterController</value>
		</property>
	</bean>
	<bean id="ParameterController" factory-bean="parameterControllerClass" factory-method="newInstance"/>
	<bean id="noViewControllerClass" parent="controllerClass">
		<property name="arguments">
			<value>NoViewController</value>
		</property>
	</bean>
	<bean id="NoViewController" factory-bean="noViewControllerClass" factory-method="newInstance"/>
</beans>