Upgrade to Tomcat 8.5.11

This commit is contained in:
Brian Clozel
2017-01-20 09:55:33 +01:00
parent 78a23be9bc
commit 35b67a54d2
930 changed files with 32832 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
# Test configuration file containing a non-existent default TestExecutionListener.
org.springframework.test.context.TestExecutionListener = org.example.FooListener

View File

@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Title</title>
</head>
<body>
<tiles:insertAttribute name="main" />
</body>
</html>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<definition name="standardLayout" templateExpression="/WEB-INF/layouts/standardLayout.jsp"/>
</tiles-definitions>

View File

@@ -0,0 +1,2 @@
<h1>Main page</h1>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<definition name="home" extends="standardLayout">
<put-attribute name="main" value="/WEB-INF/views/home.jsp" />
</definition>
</tiles-definitions>

View File

@@ -0,0 +1,16 @@
/*
* Copyright 2004-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Spring={};Spring.debug=true;Spring.decorations={};Spring.decorations.applied=false;Spring.initialize=function(){Spring.applyDecorations();Spring.remoting=new Spring.RemotingHandler();};Spring.addDecoration=function(_1){if(!Spring.decorations[_1.elementId]){Spring.decorations[_1.elementId]=[];Spring.decorations[_1.elementId].push(_1);}else{var _2=false;for(var i=0;i<Spring.decorations[_1.elementId].length;i++){var _4=Spring.decorations[_1.elementId][i];if(_4.equals(_1)){if(_4.cleanup!=undefined){_4.cleanup();}Spring.decorations[_1.elementId][i]=_1;_2=true;break;}}if(!_2){Spring.decorations[_1.elementId].push(_1);}}if(Spring.decorations.applied){_1.apply();}};Spring.applyDecorations=function(){if(!Spring.decorations.applied){for(var _5 in Spring.decorations){for(var x=0;x<Spring.decorations[_5].length;x++){Spring.decorations[_5][x].apply();}}Spring.decorations.applied=true;}};Spring.validateAll=function(){var _7=true;for(var _8 in Spring.decorations){for(var x=0;x<Spring.decorations[_8].length;x++){if(Spring.decorations[_8][x].widget&&!Spring.decorations[_8][x].validate()){_7=false;}}}return _7;};Spring.validateRequired=function(){var _a=true;for(var _b in Spring.decorations){for(var x=0;x<Spring.decorations[_b].length;x++){if(Spring.decorations[_b][x].widget&&Spring.decorations[_b][x].isRequired()&&!Spring.decorations[_b][x].validate()){_a=false;}}}return _a;};Spring.AbstractElementDecoration=function(){};Spring.AbstractElementDecoration.prototype={elementId:"",widgetType:"",widgetModule:"",widget:null,widgetAttrs:{},apply:function(){},validate:function(){},isRequired:function(){},equals:function(_d){}};Spring.AbstractValidateAllDecoration=function(){};Spring.AbstractValidateAllDecoration.prototype={event:"",elementId:"",apply:function(){},cleanup:function(){},handleEvent:function(_e){},equals:function(_f){}};Spring.AbstractCommandLinkDecoration=function(){};Spring.AbstractCommandLinkDecoration.prototype={elementId:"",linkHtml:"",apply:function(){},submitFormFromLink:function(_10,_11,_12){},equals:function(_13){}};Spring.AbstractAjaxEventDecoration=function(){};Spring.AbstractAjaxEventDecoration.prototype={event:"",elementId:"",sourceId:"",formId:"",popup:false,params:{},apply:function(){},cleanup:function(){},submit:function(_14){},equals:function(_15){}};Spring.AbstractRemotingHandler=function(){};Spring.AbstractRemotingHandler.prototype={submitForm:function(_16,_17,_18){},getLinkedResource:function(_19,_1a,_1b){},getResource:function(_1c,_1d,_1e){},handleResponse:function(){},handleError:function(){}};

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
<File name="File" fileName="build/logs/spring-test.log">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</File>
</Appenders>
<Loggers>
<Logger name="org.junit.platform" level="info" />
<Logger name="org.springframework.test.context" level="warn" />
<Logger name="org.springframework.test.context.TestContext" level="warn" />
<Logger name="org.springframework.test.context.TestContextManager" level="warn" />
<Logger name="org.springframework.test.context.ContextLoaderUtils" level="warn" />
<Logger name="org.springframework.test.context.cache" level="warn" />
<Logger name="org.springframework.test.context.junit4.rules" level="warn" />
<Logger name="org.springframework.test.context.transaction.TransactionalTestExecutionListener" level="warn" />
<Logger name="org.springframework.test.context.web" level="warn" />
<!-- The following must be kept at DEBUG in order to test SPR-14363. -->
<Logger name="org.springframework.test.util" level="debug" />
<!--
<Logger name="org.springframework.test.context.support" level="info" />
<Logger name="org.springframework.test.context.support.DelegatingSmartContextLoader" level="info" />
<Logger name="org.springframework.test.context.support.AbstractGenericContextLoader" level="info" />
<Logger name="org.springframework.test.context.support.AnnotationConfigContextLoader" level="info" />
<Logger name="org.springframework.beans" level="warn" />
<Logger name="org.springframework.test.web.servlet.result" level="debug" />
-->
<Root level="error">
<AppenderRef ref="Console" />
<AppenderRef ref="File" />
</Root>
</Loggers>
</Configuration>

View File

@@ -0,0 +1,5 @@
dog.(class)=org.springframework.tests.sample.beans.Pet
dog.$0=Fido
testString2.(class)=java.lang.String
testString2.$0=Test String #2

View File

@@ -0,0 +1,5 @@
dog.(class)=org.springframework.tests.sample.beans.Pet
dog.$0=Fido
testString2.(class)=java.lang.String
testString2.$0=Test String #2

View File

@@ -0,0 +1 @@
SystemPropertyOverridePropertiesFileTestPropertySourceTests.riddle = enigma

View File

@@ -0,0 +1 @@
explicit = enigma

View File

@@ -0,0 +1 @@
extended = 42

View File

@@ -0,0 +1,44 @@
<?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="properties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="user.name">Dave</prop>
<prop key="username">Andy</prop>
</props>
</property>
</bean>
<!-- spr5906 -->
<bean id="derived"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="user.name">#{properties['user.name']}</prop>
<prop key="username">#{properties['username']}</prop>
<prop key="username.no.quotes">#{properties[username]}</prop>
<prop key="username.no.brackets">#{properties.username}</prop>
<prop key="#{properties['user.name']}">exists</prop>
<prop key="#{properties.username}">exists also</prop>
</props>
</property>
</bean>
<!-- spr5847 -->
<bean id="andy"
class="org.springframework.test.context.expression.ExpressionUsageTests$Foo">
<property name="name" value="#{properties.username}" />
</bean>
<bean id="andy2"
class="org.springframework.test.context.expression.ExpressionUsageTests$Foo">
<property name="name" value="#{properties.username }" /><!-- space in expression -->
</bean>
</beans>

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.context.groovy
import org.springframework.tests.sample.beans.Employee
import org.springframework.tests.sample.beans.Pet
/**
* Groovy script for defining Spring beans for integration tests.
*
* @author Sam Brannen
* @since 4.1
*/
beans {
foo String, 'Foo'
bar String, 'Bar'
employee(Employee) {
name = "Dilbert"
age = 42
company = "???"
}
pet(Pet, 'Dogbert')
}

View File

@@ -0,0 +1,9 @@
<?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="foo" class="java.lang.String">
<constructor-arg value="Foo" />
</bean>
</beans>

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.context.groovy
/**
* This is intentionally an empty config file, since the XML file should
* be picked up as the default before a Groovy script.
*
* <p>See: {@code DefaultScriptDetectionXmlSupersedesGroovySpringContextTests-context.xml}
*
* @author Sam Brannen
* @since 4.1
*/
beans {
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.context.groovy
import org.springframework.tests.sample.beans.Employee
import org.springframework.tests.sample.beans.Pet
/**
* Groovy script for defining Spring beans for integration tests.
*
* @author Sam Brannen
* @since 4.1
*/
beans {
foo String, 'Foo'
bar String, 'Bar'
employee(Employee) {
name = "Dilbert"
age = 42
company = "???"
}
pet(Pet, 'Dogbert')
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.context.groovy
/**
* Groovy script for defining Spring beans for integration tests.
*
* @author Sam Brannen
* @since 4.1
*/
beans {
foo String, 'Groovy Foo'
bar String, 'Groovy Bar'
}

View File

@@ -0,0 +1,19 @@
<?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="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="Dilbert" />
<property name="age" value="42" />
<property name="company" value="???" />
</bean>
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Dogbert" />
</bean>
<bean id="bar" class="java.lang.String">
<constructor-arg value="XML Bar" />
</bean>
</beans>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="bar" class="java.lang.String" c:_="bar" />
<bean id="baz" class="java.lang.String" c:_="baz-child" />
</beans>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="foo" class="java.lang.String" c:_="foo-level-2" />
<bean id="baz" class="java.lang.String" c:_="baz" />
</beans>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="dispatcher" class="java.lang.String" c:_="dispatcher" />
</beans>

View File

@@ -0,0 +1,10 @@
DROP TABLE user IF EXISTS;
CREATE TABLE user (
name VARCHAR(20) NOT NULL,
PRIMARY KEY(name)
);
INSERT INTO user VALUES('Dilbert');
INSERT INTO user VALUES('Dogbert');
INSERT INTO user VALUES('Catbert');

View File

@@ -0,0 +1,9 @@
DROP TABLE user IF EXISTS;
CREATE TABLE user (
name VARCHAR(20) NOT NULL,
PRIMARY KEY(name)
);
INSERT INTO user VALUES('Dilbert');
INSERT INTO user VALUES('Dogbert');

View File

@@ -0,0 +1 @@
INSERT INTO user VALUES('Catbert');

View File

@@ -0,0 +1 @@
INSERT INTO user VALUES('Dogbert');

View File

@@ -0,0 +1,22 @@
` custom single-line comment
#$ custom
block
comment
$#
INSERT
INTO
user
VALUES('Dilbert')
@@
` custom single-line comment
INSERT INTO user VALUES('Dogbert')@@
INSERT INTO user VALUES('Catbert')@@

View File

@@ -0,0 +1 @@
INSERT INTO user VALUES('Dilbert');

View File

@@ -0,0 +1 @@
DROP TABLE user IF EXISTS;

View File

@@ -0,0 +1,4 @@
CREATE TABLE user (
name VARCHAR(20) NOT NULL,
PRIMARY KEY(name)
);

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="transactionalTests-context.xml" />
<jdbc:initialize-database data-source="dataSource" >
<jdbc:script location="classpath:/org/springframework/test/jdbc/data.sql"/>
</jdbc:initialize-database>
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
<bean id="foo" class="java.lang.String">
<constructor-arg value="Foo" />
</bean>
<bean id="bar" class="java.lang.String">
<constructor-arg value="Bar" />
</bean>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<jdbc:embedded-database id="dataSource" generate-name="true" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:data-source-ref="dataSource" />
</beans>

View File

@@ -0,0 +1,11 @@
<?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-2.5.xsd">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
</beans>

View File

@@ -0,0 +1,9 @@
<?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-2.5.xsd">
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
</beans>

View File

@@ -0,0 +1,13 @@
<?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-2.5.xsd">
<bean id="foo" class="java.lang.String">
<constructor-arg value="Foo" />
</bean>
<bean id="bar" class="java.lang.String">
<constructor-arg value="Bar" />
</bean>
</beans>

View File

@@ -0,0 +1,21 @@
<?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="employee1" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
<bean id="employee2" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="Jane Smith" />
<property name="age" value="38" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
</beans>

View File

@@ -0,0 +1,5 @@
cat.(class)=org.springframework.tests.sample.beans.Pet
cat.$0=Garfield
testString.(class)=java.lang.String
testString.$0=Test String

View File

@@ -0,0 +1,27 @@
<?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-2.5.xsd">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
<bean id="foo" class="java.lang.String">
<constructor-arg value="Foo" />
</bean>
<bean id="bar" class="java.lang.String">
<constructor-arg value="Bar" />
</bean>
<bean id="quux" class="java.lang.String">
<constructor-arg value="Quux" />
</bean>
</beans>

View File

@@ -0,0 +1,19 @@
<?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.1.xsd">
<bean id="foo" class="java.lang.String">
<constructor-arg value="foo" />
</bean>
<bean id="baz" class="java.lang.String">
<constructor-arg value="global config" />
</bean>
<beans profile="dev">
<bean id="baz" class="java.lang.String">
<constructor-arg value="dev profile config" />
</bean>
</beans>
</beans>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="fooFromXml" class="java.lang.String" c:_="XML" />
<bean id="enigma" class="java.lang.String" c:_="enigma from XML" />
</beans>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<context:component-scan base-package="org.springframework.test.context.junit4.orm"/>
<tx:annotation-driven />
<jdbc:embedded-database id="dataSource" type="HSQL">
<jdbc:script location="classpath:/org/springframework/test/context/junit4/orm/db-schema.sql"/>
<jdbc:script location="classpath:/org/springframework/test/context/junit4/orm/db-test-data.sql"/>
</jdbc:embedded-database>
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
p:dataSource-ref="dataSource">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/springframework/test/context/junit4/orm/domain/Person.hbm.xml</value>
<value>org/springframework/test/context/junit4/orm/domain/DriversLicense.hbm.xml</value>
</list>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory"/>
</beans>

View File

@@ -0,0 +1,16 @@
DROP TABLE drivers_license IF EXISTS;
DROP TABLE person IF EXISTS;
CREATE TABLE person (
id INTEGER NOT NULL IDENTITY,
name VARCHAR(50) NOT NULL,
drivers_license_id INTEGER NOT NULL
);
CREATE UNIQUE INDEX person_name ON person(name);
CREATE UNIQUE INDEX person_drivers_license_id ON person(drivers_license_id);
CREATE TABLE drivers_license (
id INTEGER NOT NULL IDENTITY,
license_number INTEGER NOT NULL
);
CREATE UNIQUE INDEX drivers_license_license_number ON drivers_license(license_number);

View File

@@ -0,0 +1,3 @@
INSERT INTO drivers_license(id, license_number) values(1, 1234);
INSERT INTO person(id, name, drivers_license_id) values(1, 'Sam', 1);

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true" default-lazy="false">
<class name="org.springframework.test.context.junit4.orm.domain.DriversLicense" table="drivers_license">
<id name="id" column="id">
<generator class="identity" />
</id>
<property name="number" column="license_number" />
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true" default-lazy="false">
<class name="org.springframework.test.context.junit4.orm.domain.Person" table="person">
<id name="id" column="id">
<generator class="identity" />
</id>
<property name="name" column="name" />
<many-to-one name="driversLicense" class="org.springframework.test.context.junit4.orm.domain.DriversLicense"
column="drivers_license_id" unique="true" />
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,13 @@
<?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.1.xsd">
<beans profile="dev">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
</beans>
</beans>

View File

@@ -0,0 +1,17 @@
<?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.1.xsd">
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
<beans profile="dev">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
</beans>
</beans>

View File

@@ -0,0 +1,11 @@
<?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-2.5.xsd">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="Yoda" />
<property name="age" value="900" />
<property name="company" value="The Force" />
</bean>
</beans>

View File

@@ -0,0 +1,11 @@
<?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-2.5.xsd">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee">
<property name="name" value="John Smith" />
<property name="age" value="42" />
<property name="company" value="Acme Widgets, Inc." />
</bean>
</beans>

View File

@@ -0,0 +1,9 @@
<?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-2.5.xsd">
<bean id="pet" class="org.springframework.tests.sample.beans.Pet">
<constructor-arg value="Fido" />
</bean>
</beans>

View File

@@ -0,0 +1,13 @@
<?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-2.5.xsd">
<bean id="foo" class="java.lang.String">
<constructor-arg value="normal" />
</bean>
<bean id="customFoo" class="java.lang.String">
<constructor-arg value="custom" />
</bean>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd">
<jdbc:embedded-database id="dataSource" generate-name="true">
<jdbc:script location="classpath:/org/springframework/test/context/junit4/spr8849/spr8849-schema.sql" />
</jdbc:embedded-database>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd">
<jdbc:embedded-database id="dataSource" database-name="#{T(java.util.UUID).randomUUID().toString()}">
<jdbc:script location="classpath:/org/springframework/test/context/junit4/spr8849/spr8849-schema.sql" />
</jdbc:embedded-database>
</beans>

View File

@@ -0,0 +1,3 @@
CREATE TABLE enigma (
id INTEGER NOT NULL IDENTITY
);

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<mvc:annotation-driven />
<mvc:default-servlet-handler />
</beans>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<jdbc:embedded-database id="dataSource" generate-name="true">
<jdbc:script location="classpath:/org/springframework/test/jdbc/schema.sql"/>
</jdbc:embedded-database>
<jdbc:embedded-database id="dataSource2" generate-name="true">
<jdbc:script location="classpath:/org/springframework/test/jdbc/schema.sql"/>
</jdbc:embedded-database>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource" />
<bean id="transactionManager2" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource2">
</bean>
</beans>

View File

@@ -0,0 +1,7 @@
<?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.1.xsd">
<!-- intentionally empty: only needed so that the ContextLoader can find this file -->
</beans>

View File

@@ -0,0 +1,7 @@
<?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-2.5.xsd">
<!-- intentionally empty: only needed so that the ContextLoader can load a file -->
</beans>

View File

@@ -0,0 +1,7 @@
<?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.1.xsd">
<!-- intentionally empty: we just need the file to be present to fail the test -->
</beans>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="foo" class="java.lang.String" c:_="foo" />
</beans>

View File

@@ -0,0 +1,7 @@
<?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.1.xsd">
<!-- intentionally empty: only needed so that the ContextLoader can find this file -->
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:c="http://www.springframework.org/schema/c"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<bean id="employee" class="org.springframework.tests.sample.beans.Employee" p:name="John Smith" p:age="42"
p:company="Acme Widgets, Inc." />
<bean id="pet" class="org.springframework.tests.sample.beans.Pet" c:_="Fido" />
<bean id="foo" class="java.lang.String" c:_="Foo" />
<bean id="bar" class="java.lang.String" c:_="Bar" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:data-source-ref="dataSource" />
<jdbc:embedded-database id="dataSource">
<jdbc:script location="classpath:/org/springframework/test/jdbc/schema.sql" />
<jdbc:script location="classpath:/org/springframework/test/jdbc/data.sql" />
</jdbc:embedded-database>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<jdbc:embedded-database id="dataSource" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:data-source-ref="dataSource" />
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<jdbc:embedded-database id="dataSource" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:data-source-ref="dataSource" />
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<jdbc:embedded-database id="dataSource" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:data-source-ref="dataSource" />
</beans>

View File

@@ -0,0 +1,9 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="EJB-TX-Package" verbose="1">
<test name="Package">
<packages>
<package name="org.springframework.test.context.testng.transaction.ejb" />
</packages>
</test>
</suite>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="EJB-TX-Separate" verbose="1">
<test name="RollbackForRequiredEjbTxDaoTestNGTests">
<classes>
<class name="org.springframework.test.context.testng.transaction.ejb.RollbackForRequiredEjbTxDaoTestNGTests" />
</classes>
</test>
<test name="CommitForRequiredEjbTxDaoTestNGTests">
<classes>
<class name="org.springframework.test.context.testng.transaction.ejb.CommitForRequiredEjbTxDaoTestNGTests" />
</classes>
</test>
<test name="CommitForRequiresNewEjbTxDaoTestNGTests">
<classes>
<class name="org.springframework.test.context.testng.transaction.ejb.CommitForRequiresNewEjbTxDaoTestNGTests" />
</classes>
</test>
<test name="RollbackForRequiresNewEjbTxDaoTestNGTests">
<classes>
<class name="org.springframework.test.context.testng.transaction.ejb.RollbackForRequiresNewEjbTxDaoTestNGTests" />
</classes>
</test>
</suite>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="EJB-TX-Together" verbose="1">
<test name="Together">
<classes>
<class name="org.springframework.test.context.testng.transaction.ejb.RollbackForRequiredEjbTxDaoTestNGTests" />
<class name="org.springframework.test.context.testng.transaction.ejb.CommitForRequiredEjbTxDaoTestNGTests" />
<class name="org.springframework.test.context.testng.transaction.ejb.CommitForRequiresNewEjbTxDaoTestNGTests" />
<class name="org.springframework.test.context.testng.transaction.ejb.RollbackForRequiresNewEjbTxDaoTestNGTests" />
</classes>
</test>
</suite>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-lazy-init="true" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:annotation-config />
<tx:annotation-driven />
<jdbc:embedded-database id="dataSource" />
<bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="false" />
<property name="generateDdl" value="true" />
<property name="database" value="HSQL" />
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
<property name="packagesToScan" value="org.springframework.test.context.transaction.ejb.model" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
<property name="dataSource" ref="dataSource" />
</bean>
</beans>

View File

@@ -0,0 +1,9 @@
<?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">
<import resource="common-config.xml" />
<bean class="org.springframework.test.context.transaction.ejb.dao.RequiredEjbTxTestEntityDao" />
</beans>

View File

@@ -0,0 +1,9 @@
<?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">
<import resource="common-config.xml" />
<bean class="org.springframework.test.context.transaction.ejb.dao.RequiresNewEjbTxTestEntityDao" />
</beans>

View File

@@ -0,0 +1,3 @@
package org.springframework.test.context.web
beans { foo String, 'Groovy Foo' }

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="foo" class="java.lang.String" c:_="bar">
<qualifier value="foo" />
</bean>
</beans>

View File

@@ -0,0 +1,11 @@
<?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="requestScopedTestBean" class="org.springframework.tests.sample.beans.TestBean" scope="request">
<property name="name" value="#{request.contextPath}" />
</bean>
<bean id="sessionScopedTestBean" class="org.springframework.tests.sample.beans.TestBean" scope="session" />
</beans>

View File

@@ -0,0 +1 @@
INSERT INTO person VALUES('bob');

View File

@@ -0,0 +1,6 @@
DROP TABLE person IF EXISTS;
CREATE TABLE person (
name VARCHAR(20) NOT NULL,
PRIMARY KEY(name)
);

View File

@@ -0,0 +1,5 @@
{
"name" : "Ludwig van Beethoven",
"someDouble" : "1.6035",
"someBoolean" : "true"
}

View File

@@ -0,0 +1,12 @@
<?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.1.xsd">
<bean id="personDao" class="org.mockito.Mockito" factory-method="mock">
<constructor-arg value="org.springframework.test.web.servlet.samples.context.PersonDao" />
</bean>
</beans>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<mvc:annotation-driven />
<bean class="org.springframework.test.web.servlet.samples.context.PersonController">
<constructor-arg ref="personDao"/>
</bean>
<mvc:view-controller path="/" view-name="home" />
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:default-servlet-handler />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.tiles3.TilesView" />
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<value>
/WEB-INF/**/tiles.xml
</value>
</property>
</bean>
</beans>