package org.zalando.problem.spring.web.autoconfigure;

import org.apiguardian.api.API;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
import org.zalando.problem.spring.web.advice.AdviceTrait;

import static org.apiguardian.api.API.Status.INTERNAL;

@API(status = INTERNAL)
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication
@ConditionalOnClass(WebSecurityConfigurer.class)
public class ProblemAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(AdviceTrait.class)
    public AdviceTrait exceptionHandling() {
        return new ExceptionHandling();
    }

}

@@ -84,84 +84,8 @@
 PI;%0A
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;%0A
 impo
@@ -158,24 +158,24 @@
 issingBean;%0A
+
 import org.s
@@ -364,89 +364,8 @@
 on;%0A
-import org.springframework.security.config.annotation.web.WebSecurityConfigurer;%0A
 impo
@@ -540,16 +540,16 @@
  false)%0A
+
 @Conditi
@@ -573,57 +573,8 @@
 ion%0A
-@ConditionalOnClass(WebSecurityConfigurer.class)%0A
 publ

Remove Spring Security class dependency