45846 and #46013 shows that using auto-configuration isn't ideal. Instead we think this code should probably be in an EnvironmentPostProcessor
.
Comment From: mhalbritter
There could be other cases hiding in auto-configurations, so it'd be a good idea to look for the general pattern.