Hello,
I am not sure if it's a bug or wanted behavior but there is definitely a change in behavior between 2.0.4 and 2.1 and this change is not listed in 2.1 release notes.
For 2.0.4 combination of setting
spring.application.autoconfigure.exclude=autoclazz in application.properties and
@ImportAutoConfiguration(classes = autoclazz) in @Configuration class enabled by @Profile the autoclazz is being applied.
For 2.1 autoclazz is being excluded globally no matter of @ImportAutoConfiguration usage, autoclazz is not imported.
Let me know if it's unclear.