If you don't need to use @SpringBootApplication, the @EnableAutoConfiguration and @ComponentScan annotations that it imports defines that habits so You can even use These alternatively.
This repository includes the https://kianaxflt312525.timeblog.net/66084347/5-simple-statements-about-spring-boot-development-services-explained