Adds deprecation warning to starters. Fixes #2148.

This commit is contained in:
Ryan Baxter
2017-08-18 12:30:45 -04:00
parent 24cbbb9a11
commit b519ad8d18
26 changed files with 326 additions and 0 deletions

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