If you don't need to use @SpringBootApplication, the @EnableAutoConfiguration and @ComponentScan annotations that it imports defines that habits so you can also use those as an alternative.
This may be Anyone in https://jaysonnfkd121858.dbblog.net/3542161/spring-boot-security-things-to-know-before-you-buy