1

I use Spring boot 2 and Spring security but I can't disable the default security. This is my configuration class:

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter
Ortomala Lokni
63.5k27 gold badges202 silver badges268 bronze badges
asked Mar 10, 2019 at 12:37
2
  • You need to exclude security auto configuration: @SpringBootApplication(exclude={SecurityAutoConfiguration.class}) Commented Mar 10, 2019 at 12:41
  • thank you zakaria amine for your answer. My problem is resolved Commented Mar 11, 2019 at 14:39

1 Answer 1

1

As said in the comments, you have to exclude the security auto configuration with:

@SpringBootApplication(exclude={SecurityAutoConfiguration.class})
answered Mar 29, 2019 at 23:16
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.