As explained in https://github.com/spring-projects/spring-boot/issues/10094#issuecomment-343880145, some of the keys in the spring.freemarker.* namespace aren't supported in WebFlux.
We should properly document limitations and enhance the existing support if possible.
Comment From: hantsy
@bclozel It seems spring-boot-starter-freemarker still depends on a spring-boot-starter-web directly, it is possible make it optional?
When I started a WebFlux application(based on Spring Boot 2.0.0.M7), I have to exclude spring-boot-starter-web explicitly.
See: https://github.com/hantsy/spring-reactive-sample/blob/master/boot-freemarker/pom.xml#L39-L44
I have updated my sample, the auto configuration for webflux works well now.
Comment From: wilkinsona
@hantsy Please open a separate issue for that. It seems like a sensible change to me (it would align with what was done for Thymeleaf) but is not related to configuration properties.
Comment From: snicoll
Looking at those properties, most of them are available only to a "template" view resolver
- spring.freemarker.allow-request-override
- spring.freemarker.allow-session-override
- spring.freemarker.expose-request-attributes
- spring.freemarker.expose-session-attributes
- spring.freemarker.expose-spring-macro-helpers
- spring.freemarker.content-type
We could override the metadata with "Not supported on WebFlux" or something like that.
As for caching spring.freemarker.cache is still not supported.