diff --git a/spring-boot-actuator-docs/pom.xml b/spring-boot-actuator-docs/pom.xml
index 12927fbc86..6ef2498e11 100644
--- a/spring-boot-actuator-docs/pom.xml
+++ b/spring-boot-actuator-docs/pom.xml
@@ -21,7 +21,7 @@
org.springframework.boot
- spring-boot-starter-actuator
+ spring-boot-actuator
provided
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/InfoEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/InfoEndpoint.java
index 60a9f696cf..b9915c6fb4 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/InfoEndpoint.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/InfoEndpoint.java
@@ -54,8 +54,7 @@ public class InfoEndpoint extends AbstractEndpoint
-
org.springframework.boot
spring-boot-starter-redis
1.4.0.BUILD-SNAPSHOT
diff --git a/spring-boot-starters/spring-boot-starter-redis/pom.xml b/spring-boot-starters/spring-boot-starter-redis/pom.xml
index 56bf9e8893..6e699543fb 100644
--- a/spring-boot-starters/spring-boot-starter-redis/pom.xml
+++ b/spring-boot-starters/spring-boot-starter-redis/pom.xml
@@ -8,9 +8,8 @@
spring-boot-starter-redis
spring-boot-starter-redis (DEPRECATED)
- DEPRECATED (use spring-boot-starter-data-redis instead).
- Starter for using Redis key-value data store with Spring Data Redis and
- the Jedis client
+ Starter for using Redis key-value data store with Spring Data Redis and
+ the Jedis client. Deprecated as of 1.4 in favor of spring-boot-starter-data-redis
http://projects.spring.io/spring-boot/
Pivotal Software, Inc.
diff --git a/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java b/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java
new file mode 100644
index 0000000000..1fbd6cf31b
--- /dev/null
+++ b/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2012-2016 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.boot.starter.redis;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * {@link EnableAutoConfiguration Auto-configuration} to print a deprecation warning about
+ * the starter.
+ *
+ * @author Phillip Webb
+ * @since 1.4.0
+ */
+@Configuration
+@Deprecated
+public class RedisStarterDepricationWarningAutoConfiguration {
+
+ private static final Log logger = LogFactory
+ .getLog(RedisStarterDepricationWarningAutoConfiguration.class);
+
+ @PostConstruct
+ public void logWarning() {
+ logger.warn("spring-boot-starter-redis is deprecated as of Spring Boot 1.4, "
+ + "please migrate to spring-boot-starter-data-redis");
+ }
+
+}
diff --git a/spring-boot-starters/spring-boot-starter-redis/src/main/resources/META-INF/spring.factories b/spring-boot-starters/spring-boot-starter-redis/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000000..0a72942759
--- /dev/null
+++ b/spring-boot-starters/spring-boot-starter-redis/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.springframework.boot.starter.redis.RedisStarterDepricationWarningAutoConfiguration
diff --git a/spring-boot-test/src/main/java/org/springframework/boot/test/TestRestTemplate.java b/spring-boot-test/src/main/java/org/springframework/boot/test/TestRestTemplate.java
index 5604c2f3d1..97462e4480 100644
--- a/spring-boot-test/src/main/java/org/springframework/boot/test/TestRestTemplate.java
+++ b/spring-boot-test/src/main/java/org/springframework/boot/test/TestRestTemplate.java
@@ -19,51 +19,46 @@ package org.springframework.boot.test;
import org.springframework.web.client.RestTemplate;
/**
- * Convenient subclass of {@link RestTemplate} that is suitable for integration
- * tests. They are fault tolerant, and optionally can carry Basic authentication
- * headers. If Apache Http Client 4.3.2 or better is available (recommended) it
- * will be used as the client, and by default configured to ignore cookies and
- * redirects.
+ * Convenient subclass of {@link RestTemplate} that is suitable for integration tests.
+ * They are fault tolerant, and optionally can carry Basic authentication headers. If
+ * Apache Http Client 4.3.2 or better is available (recommended) it will be used as the
+ * client, and by default configured to ignore cookies and redirects.
*
* @author Dave Syer
* @author Phillip Webb
* @deprecated as of 1.4 in favor of
- * {@link org.springframework.boot.test.web.client.TestRestTemplate}
+ * {@link org.springframework.boot.test.web.client.TestRestTemplate}
*/
@Deprecated
-public class TestRestTemplate extends org.springframework.boot.test.web.client.TestRestTemplate {
+public class TestRestTemplate
+ extends org.springframework.boot.test.web.client.TestRestTemplate {
/**
* Create a new {@link TestRestTemplate} instance.
- *
- * @param httpClientOptions
- * client options to use if the Apache HTTP Client is used
+ * @param httpClientOptions client options to use if the Apache HTTP Client is used
*/
public TestRestTemplate(HttpClientOption... httpClientOptions) {
- super(options(httpClientOptions));
+ super(convertOptions(httpClientOptions));
}
/**
- * Create a new {@link TestRestTemplate} instance with the specified
- * credentials.
- *
- * @param username
- * the username to use (or {@code null})
- * @param password
- * the password (or {@code null})
- * @param httpClientOptions
- * client options to use if the Apache HTTP Client is used
+ * Create a new {@link TestRestTemplate} instance with the specified credentials.
+ * @param username the username to use (or {@code null})
+ * @param password the password (or {@code null})
+ * @param httpClientOptions client options to use if the Apache HTTP Client is used
*/
- public TestRestTemplate(String username, String password, HttpClientOption... httpClientOptions) {
- super(username, password, options(httpClientOptions));
+ public TestRestTemplate(String username, String password,
+ HttpClientOption... httpClientOptions) {
+ super(username, password, convertOptions(httpClientOptions));
}
- private static org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[] options(
- HttpClientOption[] httpClientOptions) {
- org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[] result = new org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[httpClientOptions.length];
- for (int i = 0; i < httpClientOptions.length; i++) {
- HttpClientOption httpClientOption = httpClientOptions[i];
- result[i] = org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption.valueOf(httpClientOption.name());
+ private static org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[] convertOptions(
+ HttpClientOption[] options) {
+ org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[] result = new org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption[options.length];
+ for (int i = 0; i < options.length; i++) {
+ HttpClientOption option = options[i];
+ result[i] = org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
+ .valueOf(option.name());
}
return result;
}
diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/TestRestTemplateTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/TestRestTemplateTests.java
index ee6cd64c70..e43c3bbcf8 100644
--- a/spring-boot-test/src/test/java/org/springframework/boot/test/TestRestTemplateTests.java
+++ b/spring-boot-test/src/test/java/org/springframework/boot/test/TestRestTemplateTests.java
@@ -20,11 +20,18 @@ import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
+/**
+ * Tests for the deprecated {@link TestRestTemplate}.
+ *
+ * @author Dave Syer
+ */
+@Deprecated
public class TestRestTemplateTests {
@Test
public void canCreateTemplateFromOwnOptions() {
- TestRestTemplate template = new TestRestTemplate(TestRestTemplate.HttpClientOption.ENABLE_REDIRECTS);
+ TestRestTemplate template = new TestRestTemplate(
+ TestRestTemplate.HttpClientOption.ENABLE_REDIRECTS);
assertThat(template).isNotNull();
}
diff --git a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java
index befd2b2ee3..e1a479180d 100644
--- a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java
+++ b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java
@@ -1065,7 +1065,6 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
}
}
-
private class TestGzipInputStreamFactory implements InputStreamFactory {
private final AtomicBoolean requested = new AtomicBoolean(false);