Similar to #31228, the org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports file can be generated automatically by using an annotation processor to scan for classes annotated with @ManagementContextConfiguration.
Comment From: scottfrederick
See https://github.com/spring-projects/spring-boot/issues/31228#issuecomment-1254162868