Remove deprecated starters

fixes gh-1946, gh-2220, gh-2221, gh-2222
This commit is contained in:
Spencer Gibb
2017-09-25 17:17:26 -04:00
parent b9a479607c
commit 6775e76e5f
52 changed files with 0 additions and 1493 deletions

15
pom.xml
View File

@@ -125,28 +125,13 @@
<module>spring-cloud-netflix-dependencies</module>
<module>spring-cloud-netflix-core</module>
<module>spring-cloud-netflix-hystrix-dashboard</module>
<module>spring-cloud-netflix-hystrix-amqp</module>
<module>spring-cloud-netflix-hystrix-stream</module>
<module>spring-cloud-netflix-eureka-client</module>
<module>spring-cloud-netflix-eureka-server</module>
<module>spring-cloud-netflix-spectator</module>
<module>spring-cloud-netflix-turbine</module>
<module>spring-cloud-netflix-turbine-stream</module>
<module>spring-cloud-netflix-sidecar</module>
<module>spring-cloud-starter-netflix</module>
<module>spring-cloud-starter-archaius</module>
<module>spring-cloud-starter-atlas</module>
<module>spring-cloud-starter-eureka</module>
<module>spring-cloud-starter-eureka-server</module>
<module>spring-cloud-starter-feign</module>
<module>spring-cloud-starter-hystrix</module>
<module>spring-cloud-starter-hystrix-dashboard</module>
<module>spring-cloud-starter-ribbon</module>
<module>spring-cloud-starter-spectator</module>
<module>spring-cloud-starter-turbine</module>
<module>spring-cloud-starter-turbine-amqp</module>
<module>spring-cloud-starter-turbine-stream</module>
<module>spring-cloud-starter-zuul</module>
<module>docs</module>
</modules>
<profiles>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-hystrix-amqp</artifactId>
<name>spring-cloud-netflix-hystrix-amqp</name>
<description>Spring Cloud Netflix Hystrix AMQP (deprecated, please use spring-cloud-netflix-hystrix-stream)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1 +0,0 @@
provides: spring-cloud-netflix-turbine-amqp

View File

@@ -1,90 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-spectator</artifactId>
<packaging>jar</packaging>
<name>Spring Cloud Netflix Spectator</name>
<description>Spring Cloud Netflix Spectator</description>
<properties>
<main.basedir>${basedir}/..</main.basedir>
<spectator.version>0.30.0</spectator.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.netflix.spectator</groupId>
<artifactId>spectator-api</artifactId>
<version>${spectator.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.spectator</groupId>
<artifactId>spectator-reg-servo</artifactId>
<version>${spectator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.netflix.servo</groupId>
<artifactId>servo-core</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.spectator</groupId>
<artifactId>spectator-api</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.spectator</groupId>
<artifactId>spectator-reg-servo</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -1,69 +0,0 @@
/*
* Copyright 2013-2015 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.cloud.netflix.metrics.spectator;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.boot.actuate.metrics.Metric;
import org.springframework.boot.actuate.metrics.reader.MetricReader;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import static java.util.stream.StreamSupport.stream;
/**
* Reads metrics from Spectator, placing Spectator tags in the form
* <code>name(k1=v1,k2=v2)</code> where <code>name</code> is the metric name and the
* contents of the parentheses are tag key-value pairs.
*
* @author Jon Schneider
*/
public class SpectatorMetricReader implements MetricReader {
private Registry registry;
public SpectatorMetricReader(Registry registry) {
this.registry = registry;
}
protected static String asHierarchicalName(Id id) {
List<String> tags = stream(id.tags().spliterator(), false).map(
t -> t.key() + "=" + t.value()).collect(Collectors.toList());
return id.name() + "(" + String.join(",", tags) + ")";
}
@Override
public Metric<?> findOne(String name) {
throw new UnsupportedOperationException(
"cannot construct a tag-based Spectator id from a hierarchical name");
}
@Override
public Iterable<Metric<?>> findAll() {
return stream(registry.spliterator(), false)
.flatMap(
metric -> stream(metric.measure().spliterator(), false).map(
measure -> new Metric<>(asHierarchicalName(measure.id()),
measure.value())))
.sorted((m1, m2) -> m1.getName().compareTo(m2.getName()))
.collect(Collectors.toList());
}
@Override
public long count() {
return stream(registry.spliterator(), false).flatMap(
m -> stream(m.measure().spliterator(), false)).count();
}
}

View File

@@ -1,112 +0,0 @@
/*
* Copyright 2013-2015 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.cloud.netflix.metrics.spectator;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.boot.actuate.metrics.CounterService;
import org.springframework.boot.actuate.metrics.GaugeService;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import com.netflix.spectator.impl.AtomicDouble;
/**
* Provides a <code>CounterService</code> and <code>GaugeService</code> implementation
* backed by Spectator.
*
* @author Jon Schneider
*/
public class SpectatorMetricServices implements CounterService, GaugeService {
private final Registry registry;
private final ConcurrentMap<Id, AtomicLong> counters = new ConcurrentHashMap<>();
private final ConcurrentMap<Id, AtomicDouble> gauges = new ConcurrentHashMap<>();
public SpectatorMetricServices(Registry registry) {
this.registry = registry;
}
protected static String stripMetricName(String metricName) {
return metricName.replaceFirst("^(timer|histogram|meter)\\.", "");
}
@Override
public void increment(String name) {
incrementInternal(name, 1L);
}
@Override
public void decrement(String name) {
incrementInternal(name, -1L);
}
private void incrementInternal(String name, long value) {
if (name.startsWith("status.")) {
// drop this metric since we are capturing it already with
// SpectatorHandlerInterceptor,
// and we are able to glean more information like exceptionType from that
// mechanism than what
// boot provides us
}
else if (name.startsWith("meter.")) {
registry.counter(stripMetricName(name)).increment(value);
}
else {
final Id id = registry.createId(name);
final AtomicLong gauge = getCounterStorage(id);
gauge.addAndGet(value);
}
}
@Override
public void reset(String name) {
final Id id = registry.createId(stripMetricName(name));
counters.remove(id);
gauges.remove(id);
}
@Override
public void submit(String name, double dValue) {
if (name.startsWith("histogram.")) {
registry.distributionSummary(stripMetricName(name)).record((long) dValue);
}
else if (name.startsWith("timer.")) {
// Input is in milliseconds. Convert to nanos before casting to long to allow
// sub-millisecond durations to be recorded correctly.
long value = (long) (dValue * 1e6);
registry.timer(stripMetricName(name)).record(value, TimeUnit.NANOSECONDS);
}
else {
final Id id = registry.createId(name);
final AtomicDouble gauge = getGaugeStorage(id);
gauge.set(dValue);
}
}
private AtomicDouble getGaugeStorage(Id id) {
final AtomicDouble newGauge = new AtomicDouble(0);
final AtomicDouble existingGauge = gauges.putIfAbsent(id, newGauge);
return existingGauge == null ? registry.gauge(id, newGauge) : existingGauge;
}
private AtomicLong getCounterStorage(Id id) {
final AtomicLong newCounter = new AtomicLong(0);
final AtomicLong existingCounter = counters.putIfAbsent(id, newCounter);
return existingCounter == null ? registry.gauge(id, newCounter) : existingCounter;
}
}

View File

@@ -1,95 +0,0 @@
/*
* Copyright 2013-2015 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.cloud.netflix.metrics.spectator;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricRepositoryAutoConfiguration;
import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
import org.springframework.boot.actuate.metrics.CounterService;
import org.springframework.boot.actuate.metrics.GaugeService;
import org.springframework.boot.actuate.metrics.reader.MetricReader;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.netflix.metrics.DefaultMetricsTagProvider;
import org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration;
import org.springframework.cloud.netflix.metrics.MetricsTagProvider;
import org.springframework.cloud.netflix.metrics.servo.ServoMetricsConfigBean;
import org.springframework.cloud.netflix.metrics.servo.ServoMonitorCache;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import com.netflix.servo.DefaultMonitorRegistry;
import com.netflix.servo.MonitorRegistry;
import com.netflix.spectator.api.Registry;
import com.netflix.spectator.servo.ServoRegistry;
/**
* Configures a basic Spectator registry that bridges to the legacy Servo API. We use this
* bridge because servo contains an Atlas plugin that allows us to easily send all
* Spectator metrics to Atlas. Servo contains a similar plugin for Graphite.
*
* Conditionally configures both an MVC interceptor and a RestTemplate interceptor that
* records metrics for request handling timings.
*
* @author Jon Schneider
*/
@Configuration
@AutoConfigureBefore(MetricRepositoryAutoConfiguration.class)
@ConditionalOnClass({ Registry.class, MetricReader.class })
@Import(MetricsInterceptorConfiguration.class)
public class SpectatorMetricsAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public ServoMetricsConfigBean servoMetricsConfig() {
return new ServoMetricsConfigBean();
}
@Bean
@ConditionalOnMissingBean
public MonitorRegistry monitorRegistry(ServoMetricsConfigBean configBean) {
System.setProperty(DefaultMonitorRegistry.class.getCanonicalName()
+ ".registryClass", configBean.getRegistryClass());
return DefaultMonitorRegistry.getInstance();
}
@Bean
@ConditionalOnMissingBean(Registry.class)
Registry registry(MonitorRegistry monitorRegistry) {
return new ServoRegistry();
}
@Bean
public ServoMonitorCache monitorCache(MonitorRegistry monitorRegistry, ServoMetricsConfigBean configBean) {
return new ServoMonitorCache(monitorRegistry, configBean);
}
@Bean
@ConditionalOnMissingBean({ CounterService.class, GaugeService.class })
public SpectatorMetricServices spectatorMetricServices(Registry metricRegistry) {
return new SpectatorMetricServices(metricRegistry);
}
@Bean
public MetricReaderPublicMetrics spectatorPublicMetrics(Registry metricRegistry) {
SpectatorMetricReader reader = new SpectatorMetricReader(metricRegistry);
return new MetricReaderPublicMetrics(reader);
}
@Bean
public MetricsTagProvider defaultMetricsTagProvider() {
return new DefaultMetricsTagProvider();
}
}

View File

@@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.netflix.metrics.spectator.SpectatorMetricsAutoConfiguration

View File

@@ -1,99 +0,0 @@
/*
* Copyright 2013-2015 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.cloud.netflix.metrics.spectator;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import org.junit.Test;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Tag;
import static org.junit.Assert.assertEquals;
import static org.springframework.cloud.netflix.metrics.spectator.SpectatorMetricReader.asHierarchicalName;
/**
* @author Jon Schneider
*/
public class SpectatorMetricReaderTests {
@Test
public void convertSpectatorMetricWithTagsToHierarchicalName() {
Id mWithTags = new SimpleId("m", "t1", "val1", "t2", "val2");
assertEquals("m(t1=val1,t2=val2)", asHierarchicalName(mWithTags));
}
private class SimpleTag implements Tag {
String key;
String value;
public SimpleTag(String key, String value) {
this.key = key;
this.value = value;
}
@Override
public String key() {
return key;
}
@Override
public String value() {
return value;
}
}
private class SimpleId implements Id {
String name;
Collection<Tag> tags;
public SimpleId(String name, String... tagPairs) {
this.name = name;
tags = new ArrayList<>();
for (int i = 0; i < tagPairs.length; i += 2)
tags.add(new SimpleTag(tagPairs[i], tagPairs[i + 1]));
}
@Override
public String name() {
return name;
}
@Override
public Iterable<Tag> tags() {
return tags;
}
@Override
public Id withTag(String s, String s1) {
return null;
}
@Override
public Id withTag(Tag tag) {
return null;
}
@Override
public Id withTags(Iterable<Tag> iterable) {
return null;
}
@Override
public Id withTags(Map<String, String> map) {
return null;
}
}
}

View File

@@ -1,123 +0,0 @@
/*
* Copyright 2013-2015 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.cloud.netflix.metrics.spectator;
import com.netflix.spectator.api.DefaultRegistry;
import com.netflix.spectator.api.Measurement;
import com.netflix.spectator.api.Registry;
import org.junit.Test;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.springframework.cloud.netflix.metrics.spectator.SpectatorMetricServices.stripMetricName;
public class SpectatorMetricServicesTests {
@Test
public void metricNameWithNoTypeIsLeftUnchanged() {
assertEquals("foo", stripMetricName("foo"));
assertEquals("foo.bar", stripMetricName("foo.bar"));
}
@Test
public void metricTypeIsStrippedFromMetricName() {
assertEquals("foo", stripMetricName("timer.foo"));
assertEquals("foo", stripMetricName("histogram.foo"));
assertEquals("foo", stripMetricName("meter.foo"));
}
@Test
public void metricTypeNameEmbeddedInMiddleOfMetricNameIsNotRemoved() {
assertEquals("bar.timer.foo", stripMetricName("bar.timer.foo"));
}
@Test
public void meterPrefixShouldIncrementCounter() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.increment("meter.test");
assertEquals(1, registry.counter("test").count());
}
@Test
public void otherPrefixShouldUpdateGauge() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.increment("gauge.test");
assertGaugeEquals(registry, "gauge.test", 1.0);
ms.decrement("gauge.test");
assertGaugeEquals(registry, "gauge.test", 0.0);
}
@Test
public void histogramSubmit() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.submit("histogram.test", 42.0);
assertEquals(1L, registry.distributionSummary("test").count());
assertEquals(42L, registry.distributionSummary("test").totalAmount());
}
@Test
public void timerSubmit() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.submit("timer.test", 42.0);
assertEquals(1L, registry.timer("test").count());
assertEquals(TimeUnit.MILLISECONDS.toNanos(42L), registry.timer("test").totalTime());
}
@Test
public void timerMicrosSubmit() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.submit("timer.test", 0.042);
assertEquals(1L, registry.timer("test").count());
assertEquals(TimeUnit.MICROSECONDS.toNanos(42L), registry.timer("test").totalTime());
}
@Test
public void gaugeSubmit() {
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
ms.submit("gauge.test", 42.0);
assertGaugeEquals(registry, "gauge.test", 42.0);
ms.submit("gauge.test", 1.0);
assertGaugeEquals(registry, "gauge.test", 1.0);
}
@Test
public void gaugeSubmitManyTimes() {
// Sanity check for memory leak reported in:
// https://github.com/Netflix/spectator/issues/264
Registry registry = new DefaultRegistry();
SpectatorMetricServices ms = new SpectatorMetricServices(registry);
for (int i = 0; i < 10000; ++i) {
ms.submit("gauge.test", 42.0);
assertGaugeEquals(registry, "gauge.test", 42.0);
}
}
private void assertGaugeEquals(Registry registry, String name, double expected) {
Iterator<Measurement> it = registry.get(registry.createId(name)).measure().iterator();
assertTrue(it.hasNext());
assertEquals(expected, it.next().value(), 1e-3);
assertTrue(!it.hasNext());
}
}

View File

@@ -1,163 +0,0 @@
/*
* Copyright 2013-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.
*/
package org.springframework.cloud.netflix.metrics.spectator;
import static org.junit.Assert.assertFalse;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import javax.servlet.http.HttpServletRequest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.cloud.netflix.metrics.MetricsHandlerInterceptor;
import org.springframework.cloud.netflix.metrics.servo.ServoMonitorCache;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import com.netflix.servo.MonitorRegistry;
import com.netflix.servo.monitor.BasicTimer;
import com.netflix.servo.monitor.MonitorConfig;
/**
* @author Jon Schneider
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpectatorMetricsTestConfig.class)
@WebAppConfiguration
@TestPropertySource(properties = "netflix.metrics.rest.metricName=metricName")
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class SpectatorMetricsHandlerInterceptorIntegrationTests {
@Autowired
WebApplicationContext webAppContext;
@Autowired
MonitorRegistry registry;
@Autowired
ServoMonitorCache servoMonitorCache;
MockMvc mvc;
@Test
public void autoConfigurationWiresTheMetricsInterceptor() {
assertFalse(
webAppContext.getBeansOfType(MetricsHandlerInterceptor.class).isEmpty());
}
@Before
public void setup() {
mvc = MockMvcBuilders.webAppContextSetup(webAppContext).build();
}
@Test
public void metricsGatheredWhenSuccess() throws Exception {
mvc.perform(get("/test/some/request/10")).andExpect(status().isOk());
assertTimer("test_some_request_-id-", null, 200);
}
@Test
public void metricsGatheredWhenClientRequestBad() throws Exception {
mvc.perform(get("/test/some/request/oops"))
.andExpect(status().is4xxClientError());
assertTimer("test_some_request_-id-", null, 400);
}
@Test
public void metricsGatheredWhenUnhandledError() throws Exception {
try {
mvc.perform(get("/test/some/unhandledError/10")).andExpect(status().isOk());
}
catch (Exception e) {
}
assertTimer("test_some_unhandledError_-id-", "RuntimeException", 200);
}
@Test
public void metricsGatheredWhenHandledError() throws Exception {
mvc.perform(get("/test/some/error/10")).andExpect(status().is4xxClientError());
assertTimer("test_some_error_-id-", null, 422);
}
protected void assertTimer(String uriTag, String exceptionType, Integer status) {
MonitorConfig.Builder builder = new MonitorConfig.Builder("metricName")
.withTag("method", "GET").withTag("uri", uriTag)
.withTag("status", status.toString());
if (exceptionType != null)
builder = builder.withTag("exception", exceptionType);
BasicTimer timer = servoMonitorCache.getTimer(builder.build());
Assert.assertEquals(1L, (long) timer.getCount());
}
}
@Configuration
@EnableWebMvc
@ImportAutoConfiguration({ SpectatorMetricsAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
class SpectatorMetricsTestConfig {
@Bean
SpectatorMetricsTestController testController() {
return new SpectatorMetricsTestController();
}
}
@RestController
@RequestMapping("/test/some")
@ControllerAdvice
class SpectatorMetricsTestController {
@RequestMapping("/request/{id}")
public String testSomeRequest(@PathVariable Long id) {
return id.toString();
}
@RequestMapping("/error/{id}")
public String testSomeHandledError(@PathVariable Long id) {
throw new IllegalStateException("Boom on $id!");
}
@RequestMapping("/unhandledError/{id}")
public String testSomeUnhandledError(@PathVariable Long id) {
throw new RuntimeException("Boom on $id!");
}
@ExceptionHandler(value = IllegalStateException.class)
@ResponseStatus(code = HttpStatus.UNPROCESSABLE_ENTITY)
ModelAndView defaultErrorHandler(HttpServletRequest request, Exception e) {
return new ModelAndView("error");
}
}

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-archaius</artifactId>
<name>spring-cloud-starter-archaius</name>
<description>Spring Cloud Starter Archaius (deprecated, please use spring-cloud-starter-netflix-archaius)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-archaius</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,23 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-atlas</artifactId>
<name>spring-cloud-starter-atlas</name>
<description>Spring Cloud Starter Atlas (deprecated, please use spring-cloud-starter-netflix-atlas</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-atlas</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
<name>spring-cloud-starter-eureka-server</name>
<description>Spring Cloud Starter Eureka Server (deprecated, please use spring-cloud-starter-netflix-eureka-server)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-eureka</artifactId>
<name>spring-cloud-starter-eureka</name>
<description>Spring Cloud Starter Eureka (deprecated, please use spring-cloud-starter-netflix-eureka-client</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-feign</artifactId>
<name>spring-cloud-starter-feign</name>
<description>Spring Cloud Starter Feign (deprecated, please use spring-cloud-starter-openfeign)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
<name>spring-cloud-starter-hystrix-dashboard</name>
<description>Spring Cloud Starter Hystrix Dashboard (deprecated, please use spring-cloud-starter-hystrix-dashboard)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-hystrix</artifactId>
<name>spring-cloud-starter-hystrix</name>
<description>Spring Cloud Starter Hystrix (deprecated, please use spring-cloud-starter-netflix-hystrix)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-ribbon</artifactId>
<name>spring-cloud-starter-ribbon</name>
<description>Spring Cloud Starter Ribbon (deprecated, please use spring-cloud-starter-netflix-ribbon)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-spectator</artifactId>
<name>spring-cloud-starter-spectator</name>
<description>Spring Cloud Starter Spectator (deprecated, please use spring-cloud-starter-netflix-spectator)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-spectator</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-turbine-amqp</artifactId>
<name>spring-cloud-starter-turbine-amqp</name>
<description>Spring Cloud Starter Turbine AMQP (deprecated, please use spring-cloud-starter-netflix-turbine-stream)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-turbine-amqp</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-turbine-stream</artifactId>
<name>spring-cloud-starter-turbine-stream</name>
<description>Spring Cloud Starter Turbine Stream (deprecated, please use spring-cloud-starter-netflix-turbine-stream)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
<turbine.version>2.0.0-DP.2</turbine.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-turbine-stream</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-turbine</artifactId>
<name>spring-cloud-starter-turbine</name>
<description>Spring Cloud Starter Turbine (deprecated, please use spring-cloud-starter-netflix-turbine)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
<turbine.version>1.0.0</turbine.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-starter-zuul</artifactId>
<name>spring-cloud-starter-zuul</name>
<description>Spring Cloud Starter Zuul (deprecated, please use spring-cloud-starter-netflix-zuul)</description>
<url>https://projects.spring.io/spring-cloud</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,22 +0,0 @@
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

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