View Technologies
Spring MVC 中视图技术的使用是可以插入的。您决定使用 Thymeleaf、Groovy 标记模板、JSP 或其他技术主要是一个配置更改问题。本章涵盖了与 Spring MVC 集成的视图技术。我们假设您已熟悉 View Resolution。
The use of view technologies in Spring MVC is pluggable. Whether you decide to use Thymeleaf, Groovy Markup Templates, JSPs, or other technologies is primarily a matter of a configuration change. This chapter covers view technologies integrated with Spring MVC. We assume you are already familiar with View Resolution.
Spring MVC 应用程序的视图存在于该应用程序的内部信任边界内。视图可以访问应用程序上下文的全部 Bean。因此,不建议在外部来源可以编辑模板的应用程序中使用 Spring MVC 的模板支持,因为这可能会产生安全隐患。
The views of a Spring MVC application live within the internal trust boundaries of that application. Views have access to all the beans of your application context. As such, it is not recommended to use Spring MVC’s template support in applications where the templates are editable by external sources, since this can have security implications.