From 0602eed356f82b34e375e7c6039a0224a76d7721 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Mon, 3 Jul 2017 12:04:58 -0400 Subject: [PATCH] Update Hello, Stocks, to SF 4.3.9 --- helloworld/pom.xml | 4 ++-- stocks/pom.xml | 6 ++++- .../stocks/web/ServletConfigurationTests.java | 24 +++++++++++-------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/helloworld/pom.xml b/helloworld/pom.xml index a1b029e..c32214d 100644 --- a/helloworld/pom.xml +++ b/helloworld/pom.xml @@ -16,7 +16,7 @@ true - 4.2.9.RELEASE + 4.3.9.RELEASE 1.7.2.RELEASE UTF-8 @@ -110,7 +110,7 @@ junit junit - 4.8.1 + 4.12 test diff --git a/stocks/pom.xml b/stocks/pom.xml index 4028c96..51197d6 100644 --- a/stocks/pom.xml +++ b/stocks/pom.xml @@ -15,7 +15,7 @@ true - 4.2.9.RELEASE + 4.3.9.RELEASE 1.7.2.RELEASE UTF-8 @@ -62,6 +62,10 @@ org.springframework spring-context + + org.springframework + spring-web + diff --git a/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/web/ServletConfigurationTests.java b/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/web/ServletConfigurationTests.java index 02a8953..aa41361 100644 --- a/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/web/ServletConfigurationTests.java +++ b/stocks/src/test/java/org/springframework/amqp/rabbit/stocks/web/ServletConfigurationTests.java @@ -1,11 +1,11 @@ /* - * Copyright 2002-2010 the original author or authors. - * + * Copyright 2002-2017 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. @@ -13,24 +13,28 @@ package org.springframework.amqp.rabbit.stocks.web; import org.junit.Test; -import org.springframework.context.support.ClassPathXmlApplicationContext; + +import org.springframework.web.context.support.XmlWebApplicationContext; /** * @author Dave Syer - * + * @author Gary Russell + * */ public class ServletConfigurationTests { @Test public void testContext() throws Exception { - ClassPathXmlApplicationContext parent = new ClassPathXmlApplicationContext( - "classpath:/server-bootstrap-config.xml"); + XmlWebApplicationContext parent = new XmlWebApplicationContext(); + parent.setConfigLocation("classpath:/server-bootstrap-config.xml"); + parent.refresh(); try { - ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( - new String[] { "classpath:/servlet-config.xml" }, parent); + XmlWebApplicationContext context = new XmlWebApplicationContext(); + context.setParent(parent); + context.setConfigLocation("classpath:/servlet-config.xml"); context.close(); } finally {