在 Spring Boot 中使用创新的 Groovy 模板引擎
随着 Spring Boot 1.1.0.M2 的发布,它开始支持 新的模板引擎,这是 Groovy 2.3 提供的。在这篇文章中,我们将描述使用这种引擎的好处,当然还有如何在 Boot 中使用它。
这篇文章中的所有源代码都可以在 GitHub 上找到,所以请随意克隆存储库并试用一下
git clone https://github.com/melix/springboot-groovytemplates.git
cd springboot-groovytemplates
./gradlew run
然后在浏览器中打开 http://localhost:8080
此应用程序完全使用 Groovy 编写,也使用了 GORM for Boot,但当然……