Moving HttpTraceRepository to HttpExchangeRepository
This commit is contained in:
@@ -19,7 +19,7 @@ package org.springframework.cloud.bus;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
|
||||
import org.springframework.boot.actuate.trace.http.HttpTraceRepository;
|
||||
import org.springframework.boot.actuate.web.exchanges.HttpExchangeRepository;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
@@ -68,13 +68,13 @@ public class BusAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ Endpoint.class })
|
||||
@ConditionalOnBean(HttpTraceRepository.class)
|
||||
@ConditionalOnBean(HttpExchangeRepository.class)
|
||||
@ConditionalOnProperty(BusProperties.PREFIX + ".trace.enabled")
|
||||
protected static class BusAckTraceConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public TraceListener ackTraceListener(HttpTraceRepository repository) {
|
||||
public TraceListener ackTraceListener(HttpExchangeRepository repository) {
|
||||
return new TraceListener(repository);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ import java.util.Map;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.boot.actuate.trace.http.HttpTraceRepository;
|
||||
import org.springframework.boot.actuate.web.exchanges.HttpExchangeRepository;
|
||||
import org.springframework.context.event.EventListener;
|
||||
|
||||
/**
|
||||
* A listener for sends and acks of remote application events. Inserts a record for each
|
||||
* signal in the {@link HttpTraceRepository}.
|
||||
* signal in the {@link HttpExchangeRepository}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@@ -35,9 +35,9 @@ public class TraceListener {
|
||||
|
||||
private static Log log = LogFactory.getLog(TraceListener.class);
|
||||
|
||||
private HttpTraceRepository repository;
|
||||
private HttpExchangeRepository repository;
|
||||
|
||||
public TraceListener(HttpTraceRepository repository) {
|
||||
public TraceListener(HttpExchangeRepository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user