spring-projects-experimental / spring-fu

Configuration DSLs for Spring Boot
Apache License 2.0
1.67k stars 138 forks source link

Make WebServerFactoryCustomizerBeanPostProcessor registration GraalVM native compliant. #272

Closed sdeleuze closed 4 years ago

sdeleuze commented 4 years ago

As a follow-up of #146, depends on https://github.com/oracle/graal/issues/2500.

sdeleuze commented 4 years ago

After more work on that, context.registerBean("webServerFactoryCustomizerBeanPostProcessor", WebServerFactoryCustomizerBeanPostProcessor.class) does not work without reflection configuration due to oracle/graal#2500.

But we have an easy workaround since context.registerBean("webServerFactoryCustomizerBeanPostProcessor", WebServerFactoryCustomizerBeanPostProcessor.class, WebServerFactoryCustomizerBeanPostProcessor::new) works out of the box without any configuration.

It seems it was the only place where we did not use a lambda for calling the constructor.

Reflection entry for TomcatEmbeddedWebappClassLoader is also needed but that will be handled on spring-graalvm-native side.