diff --git a/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/ProblemAutoConfiguration.java b/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/ProblemAutoConfiguration.java index 96d299ef..a29abb04 100644 --- a/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/ProblemAutoConfiguration.java +++ b/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/ProblemAutoConfiguration.java @@ -1,8 +1,10 @@ package org.zalando.problem.spring.web.autoconfigure; import org.apiguardian.api.API; +import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; +import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.zalando.problem.spring.web.advice.AdviceTrait; @@ -12,6 +14,7 @@ @API(status = INTERNAL) @Configuration(proxyBeanMethods = false) @ConditionalOnWebApplication +@AutoConfigureBefore(WebMvcAutoConfiguration.class) public class ProblemAutoConfiguration { @Bean