We do this at the moment for MVC:
https://github.com/spring-projects/spring-boot/blob/c9225675b5ac31d5b9019cc2fe66b8b98a6b792d/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java#L228-L241
We need to do similar for WebFlux once https://github.com/spring-projects/spring-framework/issues/30678 has been implemented