Skip to content

Commit

Permalink
Conditionalize web mvc metrics by @ConditionalOnWebApplication (fixes m…
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Nov 24, 2017
1 parent 66beaee commit 79640b0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.micrometer.spring.web.servlet.WebMvcTagsProvider;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -37,6 +38,7 @@
*/
@Configuration
@ConditionalOnClass(DispatcherServlet.class)
@ConditionalOnWebApplication
@EnableConfigurationProperties(MetricsProperties.class)
public class WebMvcMetricsConfiguration {

Expand Down

0 comments on commit 79640b0

Please sign in to comment.