If you don't want to use @SpringBootApplication, the @EnableAutoConfiguration and @ComponentScan annotations that it imports defines that behavior so You can even use those in its place.
This repository has the whole https://charliemkbq821940.dsiblogger.com/63130171/hire-spring-boot-developers-secrets