Annotation @Springbootapplication

This annotation defines the base of search package so that spring can work with Dependency Management.

If you don't wanna use @SpringBootApplication, you can use @EnableAutoConfiguration and @ComponentScan which basically do the scanning above.

Exclude specific configuration class

To exclude a specific one, we can just add exclude option, for example:

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class MyApplication {

}