Skip to content

Commit

Permalink
Avoid circular beans creations (skipPattern) (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ask4gilles authored and pavolloffay committed May 3, 2019
1 parent cd70bea commit 8b802ba
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.regex.Pattern;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
Expand Down Expand Up @@ -62,14 +63,14 @@ public class ServerTracingAutoConfiguration {

private static final Log log = LogFactory.getLog(ServerTracingAutoConfiguration.class);

private final Pattern skipPattern;
@Autowired
@Qualifier("skipPattern")
private Pattern skipPattern;
private final ObjectProvider<List<ServletFilterSpanDecorator>> servletFilterSpanDecorator;
private final ObjectProvider<List<HandlerInterceptorSpanDecorator>> interceptorSpanDecorator;

public ServerTracingAutoConfiguration(@Qualifier("skipPattern") Pattern skipPattern,
ObjectProvider<List<ServletFilterSpanDecorator>> servletFilterSpanDecorator,
public ServerTracingAutoConfiguration(ObjectProvider<List<ServletFilterSpanDecorator>> servletFilterSpanDecorator,
ObjectProvider<List<HandlerInterceptorSpanDecorator>> interceptorSpanDecorator) {
this.skipPattern = skipPattern;
this.servletFilterSpanDecorator = servletFilterSpanDecorator;
this.interceptorSpanDecorator = interceptorSpanDecorator;
}
Expand Down

0 comments on commit 8b802ba

Please sign in to comment.