Add Mustache support for Spring WebFlux apps

This commit moves the existing Spring MVC Mustache support to its own
`servlet` package and adds a new one under `reactive` for the WebFlux
web applications.

New `MustacheView` and `MustacheViewResolver` types resolve and render
Mustache views for WebFlux applications.

Since this templating engine is now supported by two flavors of Spring
web apps, the `spring-boot-starter-mustache` does not depend anymore on
the `spring-boot-starter-web` one: it's up to the developer to add the
relevant starter `web` or `webflux` to their application.

Fixes gh-8648
This commit is contained in:
Brian Clozel
2017-04-18 15:53:41 +02:00
parent c2e5fd031a
commit 7e77e648bf
19 changed files with 618 additions and 139 deletions

View File

@@ -8,7 +8,7 @@
</parent>
<artifactId>spring-boot-starter-mustache</artifactId>
<name>Spring Boot Mustache Starter</name>
<description>Starter for building MVC web applications using Mustache views</description>
<description>Starter for building web applications using Mustache views</description>
<url>http://projects.spring.io/spring-boot/</url>
<organization>
<name>Pivotal Software, Inc.</name>
@@ -22,10 +22,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.samskivert</groupId>
<artifactId>jmustache</artifactId>