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 {