Merge pull request #2213 from ryanjbaxter/deprecation-warnings-for-starters

Adds deprecation warning to starters
This commit is contained in:
Ryan Baxter
2017-08-18 13:21:25 -04:00
committed by GitHub
26 changed files with 326 additions and 0 deletions

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.archaius.ArchaiusStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.atlas.AtlasStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.eureka.server.EurekaServerStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.eureka.EurekaStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
oorg.springframework.cloud.starter.feign.FeignStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.hystrix.dashboard.HystrixDashboardDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.hystrix.HystrixStarterDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.ribbon.RibbonDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.spectator.SpectatorDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.turbine.amqp.TurbineAmqpDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.turbine.stream.TurbineStreamDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.turbine.TurbineDeprecationWarningAutoConfiguration

View File

@@ -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");
}
}

View File

@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.starter.zuul.ZuulDeprecationWarningAutoConfiguration