@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) if the class is on the classpath @EnableAutoConfiguration(excludeName={Sample.class}) if the class isn't on the classpath