February 2019
Intermediate to advanced
442 pages
11h 46m
English
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 ...