Fold spring-test-mvc sources into spring-test
With spring-test compiling against Servlet 3.0 it is no longer required to compile Spring MVC Test sources separately (from spring-test).
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
<h1>Main page</h1>
|
||||
@@ -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>
|
||||
@@ -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(){}};
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name" : "Ludwig van Beethoven",
|
||||
"someDouble" : "1.6035",
|
||||
"someBoolean" : "true"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,18 @@
|
||||
<b:beans xmlns:b="http://www.springframework.org/schema/beans"
|
||||
xmlns="http://www.springframework.org/schema/security"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<http auto-config="true" use-expressions="true">
|
||||
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" />
|
||||
</http>
|
||||
|
||||
<authentication-manager>
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<user name="user" password="password" authorities="ROLE_USER" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
</authentication-manager>
|
||||
</b:beans>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user