From b519ad8d188be51a69a9ec2db0abfe326c980bb8 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Fri, 18 Aug 2017 12:30:45 -0400 Subject: [PATCH] Adds deprecation warning to starters. Fixes #2148. --- ...erDeprecationWarningAutoConfiguration.java | 23 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 +++ ...erDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 +++ ...erDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 +++ ...erDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 +++ ...erDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...rdDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...erDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...onDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...orDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...qpDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 +++ ...amDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...neDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ ...ulDeprecationWarningAutoConfiguration.java | 22 ++++++++++++++++++ .../src/resources/META-INF/spring.factories | 3 +++ 26 files changed, 326 insertions(+) create mode 100644 spring-cloud-starter-archaius/src/main/java/org/springframework/cloud/starter/archaius/ArchaiusStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-archaius/src/main/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-atlas/src/main/java/org/springframework/cloud/starter/atlas/AtlasStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-atlas/src/main/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-eureka-server/src/main/java/org/springframework/cloud/starter/eureka/server/EurekaServerStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-eureka-server/src/main/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-eureka/src/main/java/org/springframework/cloud/starter/eureka/EurekaStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-eureka/src/main/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-feign/src/main/java/org/springframework/cloud/starter/feign/FeignStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-feign/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-hystrix-dashboard/src/main/java/org/springframework/cloud/starter/hystrix/dashboard/HystrixDashboardDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-hystrix-dashboard/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-hystrix/src/main/java/org/springframework/cloud/starter/hystrix/HystrixStarterDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-hystrix/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-ribbon/src/main/java/org/springframework/cloud/starter/ribbon/RibbonDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-ribbon/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-spectator/src/main/java/org/springframework/cloud/starter/spectator/SpectatorDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-spectator/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-turbine-amqp/src/main/java/org/springframework/cloud/starter/turbine/amqp/TurbineAmqpDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-turbine-amqp/src/main/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-turbine-stream/src/main/java/org/springframework/cloud/starter/turbine/stream/TurbineStreamDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-turbine-stream/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-turbine/src/main/java/org/springframework/cloud/starter/turbine/TurbineDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-turbine/src/resources/META-INF/spring.factories create mode 100644 spring-cloud-starter-zuul/src/main/java/org/springframework/cloud/starter/zuul/ZuulDeprecationWarningAutoConfiguration.java create mode 100644 spring-cloud-starter-zuul/src/resources/META-INF/spring.factories diff --git a/spring-cloud-starter-archaius/src/main/java/org/springframework/cloud/starter/archaius/ArchaiusStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-archaius/src/main/java/org/springframework/cloud/starter/archaius/ArchaiusStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..4f46f6c6 --- /dev/null +++ b/spring-cloud-starter-archaius/src/main/java/org/springframework/cloud/starter/archaius/ArchaiusStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,23 @@ +package org.springframework.cloud.starter.archaius; + +/** + * Auto configuration to print deprecation warning about starter. + * @author Ryan Baxter + */ + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +@Configuration +@Deprecated +public class ArchaiusStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(ArchaiusStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-archaius is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-archaius"); + } +} diff --git a/spring-cloud-starter-archaius/src/main/resources/META-INF/spring.factories b/spring-cloud-starter-archaius/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..81251113 --- /dev/null +++ b/spring-cloud-starter-archaius/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.archaius.ArchaiusStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-atlas/src/main/java/org/springframework/cloud/starter/atlas/AtlasStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-atlas/src/main/java/org/springframework/cloud/starter/atlas/AtlasStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..e37d7602 --- /dev/null +++ b/spring-cloud-starter-atlas/src/main/java/org/springframework/cloud/starter/atlas/AtlasStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.atlas; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print warning about atlas starter deprecation. + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class AtlasStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(AtlasStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-atlas is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-atlas"); + } +} diff --git a/spring-cloud-starter-atlas/src/main/resources/META-INF/spring.factories b/spring-cloud-starter-atlas/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..18290ce1 --- /dev/null +++ b/spring-cloud-starter-atlas/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.atlas.AtlasStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-eureka-server/src/main/java/org/springframework/cloud/starter/eureka/server/EurekaServerStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-eureka-server/src/main/java/org/springframework/cloud/starter/eureka/server/EurekaServerStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..9b580dd3 --- /dev/null +++ b/spring-cloud-starter-eureka-server/src/main/java/org/springframework/cloud/starter/eureka/server/EurekaServerStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.eureka.server; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning for spring-cloud-starter-eureka-server + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class EurekaServerStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(EurekaServerStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-eureka-server is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-eureka-server"); + } +} diff --git a/spring-cloud-starter-eureka-server/src/main/resources/META-INF/spring.factories b/spring-cloud-starter-eureka-server/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..b860d497 --- /dev/null +++ b/spring-cloud-starter-eureka-server/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.eureka.server.EurekaServerStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-eureka/src/main/java/org/springframework/cloud/starter/eureka/EurekaStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-eureka/src/main/java/org/springframework/cloud/starter/eureka/EurekaStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..78f5570a --- /dev/null +++ b/spring-cloud-starter-eureka/src/main/java/org/springframework/cloud/starter/eureka/EurekaStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.eureka; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print warning message about Eureka starter deprecation + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class EurekaStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(EurekaStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-eureka is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-eureka"); + } +} diff --git a/spring-cloud-starter-eureka/src/main/resources/META-INF/spring.factories b/spring-cloud-starter-eureka/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..72e87223 --- /dev/null +++ b/spring-cloud-starter-eureka/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.eureka.EurekaStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-feign/src/main/java/org/springframework/cloud/starter/feign/FeignStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-feign/src/main/java/org/springframework/cloud/starter/feign/FeignStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..0fae2f04 --- /dev/null +++ b/spring-cloud-starter-feign/src/main/java/org/springframework/cloud/starter/feign/FeignStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.feign; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to log warning about deprecation of starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class FeignStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(FeignStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-feign is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-openfeign"); + } +} diff --git a/spring-cloud-starter-feign/src/resources/META-INF/spring.factories b/spring-cloud-starter-feign/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..b2fd5b0f --- /dev/null +++ b/spring-cloud-starter-feign/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +oorg.springframework.cloud.starter.feign.FeignStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-hystrix-dashboard/src/main/java/org/springframework/cloud/starter/hystrix/dashboard/HystrixDashboardDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-hystrix-dashboard/src/main/java/org/springframework/cloud/starter/hystrix/dashboard/HystrixDashboardDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..e9ffbf39 --- /dev/null +++ b/spring-cloud-starter-hystrix-dashboard/src/main/java/org/springframework/cloud/starter/hystrix/dashboard/HystrixDashboardDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.hystrix.dashboard; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to log a warning about starter being deprecated + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class HystrixDashboardDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(HystrixDashboardDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-hystrix-dashboard is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-hystrix-dashboard"); + } +} diff --git a/spring-cloud-starter-hystrix-dashboard/src/resources/META-INF/spring.factories b/spring-cloud-starter-hystrix-dashboard/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..4c76033e --- /dev/null +++ b/spring-cloud-starter-hystrix-dashboard/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.hystrix.dashboard.HystrixDashboardDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-hystrix/src/main/java/org/springframework/cloud/starter/hystrix/HystrixStarterDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-hystrix/src/main/java/org/springframework/cloud/starter/hystrix/HystrixStarterDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..0ab42c0f --- /dev/null +++ b/spring-cloud-starter-hystrix/src/main/java/org/springframework/cloud/starter/hystrix/HystrixStarterDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.hystrix; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration class to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class HystrixStarterDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(HystrixStarterDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-hystrix is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-hystrix"); + } +} diff --git a/spring-cloud-starter-hystrix/src/resources/META-INF/spring.factories b/spring-cloud-starter-hystrix/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..e8fcc3bc --- /dev/null +++ b/spring-cloud-starter-hystrix/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.hystrix.HystrixStarterDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-ribbon/src/main/java/org/springframework/cloud/starter/ribbon/RibbonDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-ribbon/src/main/java/org/springframework/cloud/starter/ribbon/RibbonDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..bc1f86e9 --- /dev/null +++ b/spring-cloud-starter-ribbon/src/main/java/org/springframework/cloud/starter/ribbon/RibbonDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.ribbon; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class RibbonDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(RibbonDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-ribbon is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-ribbon"); + } +} diff --git a/spring-cloud-starter-ribbon/src/resources/META-INF/spring.factories b/spring-cloud-starter-ribbon/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..2ff63c60 --- /dev/null +++ b/spring-cloud-starter-ribbon/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.ribbon.RibbonDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-spectator/src/main/java/org/springframework/cloud/starter/spectator/SpectatorDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-spectator/src/main/java/org/springframework/cloud/starter/spectator/SpectatorDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..0d83acd1 --- /dev/null +++ b/spring-cloud-starter-spectator/src/main/java/org/springframework/cloud/starter/spectator/SpectatorDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.spectator; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class SpectatorDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(SpectatorDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-spectator is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-spectator"); + } +} diff --git a/spring-cloud-starter-spectator/src/resources/META-INF/spring.factories b/spring-cloud-starter-spectator/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..a8e36332 --- /dev/null +++ b/spring-cloud-starter-spectator/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.spectator.SpectatorDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-turbine-amqp/src/main/java/org/springframework/cloud/starter/turbine/amqp/TurbineAmqpDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-turbine-amqp/src/main/java/org/springframework/cloud/starter/turbine/amqp/TurbineAmqpDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..7b56c611 --- /dev/null +++ b/spring-cloud-starter-turbine-amqp/src/main/java/org/springframework/cloud/starter/turbine/amqp/TurbineAmqpDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.turbine.amqp; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration class to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class TurbineAmqpDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(TurbineAmqpDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-turbine-amqp is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-turbine-amqp"); + } +} diff --git a/spring-cloud-starter-turbine-amqp/src/main/resources/META-INF/spring.factories b/spring-cloud-starter-turbine-amqp/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..cbcd3394 --- /dev/null +++ b/spring-cloud-starter-turbine-amqp/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.turbine.amqp.TurbineAmqpDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-turbine-stream/src/main/java/org/springframework/cloud/starter/turbine/stream/TurbineStreamDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-turbine-stream/src/main/java/org/springframework/cloud/starter/turbine/stream/TurbineStreamDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..0038e75d --- /dev/null +++ b/spring-cloud-starter-turbine-stream/src/main/java/org/springframework/cloud/starter/turbine/stream/TurbineStreamDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.turbine.stream; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class TurbineStreamDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(TurbineStreamDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-turbine-stream is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-turbine-stream"); + } +} diff --git a/spring-cloud-starter-turbine-stream/src/resources/META-INF/spring.factories b/spring-cloud-starter-turbine-stream/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..d25a14ad --- /dev/null +++ b/spring-cloud-starter-turbine-stream/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.turbine.stream.TurbineStreamDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-turbine/src/main/java/org/springframework/cloud/starter/turbine/TurbineDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-turbine/src/main/java/org/springframework/cloud/starter/turbine/TurbineDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..6d0f5cd8 --- /dev/null +++ b/spring-cloud-starter-turbine/src/main/java/org/springframework/cloud/starter/turbine/TurbineDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.turbine; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class TurbineDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(TurbineDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-turbine is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-turbine"); + } +} diff --git a/spring-cloud-starter-turbine/src/resources/META-INF/spring.factories b/spring-cloud-starter-turbine/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..e41c926b --- /dev/null +++ b/spring-cloud-starter-turbine/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.turbine.TurbineDeprecationWarningAutoConfiguration \ No newline at end of file diff --git a/spring-cloud-starter-zuul/src/main/java/org/springframework/cloud/starter/zuul/ZuulDeprecationWarningAutoConfiguration.java b/spring-cloud-starter-zuul/src/main/java/org/springframework/cloud/starter/zuul/ZuulDeprecationWarningAutoConfiguration.java new file mode 100644 index 00000000..25884f6e --- /dev/null +++ b/spring-cloud-starter-zuul/src/main/java/org/springframework/cloud/starter/zuul/ZuulDeprecationWarningAutoConfiguration.java @@ -0,0 +1,22 @@ +package org.springframework.cloud.starter.zuul; + +import javax.annotation.PostConstruct; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.annotation.Configuration; + +/** + * Auto configuration to print deprecation warning for starter + * @author Ryan Baxter + */ +@Configuration +@Deprecated +public class ZuulDeprecationWarningAutoConfiguration { + private static final Log LOGGER = LogFactory.getLog(ZuulDeprecationWarningAutoConfiguration.class); + + @PostConstruct + public void logWarning() { + LOGGER.warn("spring-cloud-starter-zuul is deprecated as of Spring Cloud Netflix 1.4.0, " + + "please migrate to spring-cloud-starter-netflix-zuul"); + } +} diff --git a/spring-cloud-starter-zuul/src/resources/META-INF/spring.factories b/spring-cloud-starter-zuul/src/resources/META-INF/spring.factories new file mode 100644 index 00000000..ae19b960 --- /dev/null +++ b/spring-cloud-starter-zuul/src/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.starter.zuul.ZuulDeprecationWarningAutoConfiguration \ No newline at end of file