Excluding auto-configuration

Add an exclude attribute to the @SpringBootApplication annotation for the main bootstrap class, as in the following snippet:

@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
public class BlogpressApplication {

public static void main(String[] args) {
SpringApplication.run(BlogpressApplication.class, args);
}
}

Alternatively, you can add the following property in the application.properties file:

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration

You can take either of the previously described ways to disable or exclude the security (auto-) configuration. Excluding the auto-configuration is appropriate only in certain scenarios where you need to integrate the security provided by a custom provider.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.242.141