1
1
[[webflux-view]]
2
2
= View Technologies
3
- [.small]#<<web.adoc#mvc-view, Same as in Spring MVC>>#
3
+ [.small]#<<web.adoc#mvc-view, Web MVC>>#
4
4
5
5
The use of view technologies in Spring WebFlux is pluggable. Whether you decide to
6
6
use Thymeleaf, FreeMarker, or some other view technology is primarily a matter of a
@@ -12,7 +12,7 @@ WebFlux. We assume you are already familiar with <<webflux-viewresolution>>.
12
12
13
13
[[webflux-view-thymeleaf]]
14
14
== Thymeleaf
15
- [.small]#<<web.adoc#mvc-view-thymeleaf, Same as in Spring MVC>>#
15
+ [.small]#<<web.adoc#mvc-view-thymeleaf, Web MVC>>#
16
16
17
17
Thymeleaf is a modern server-side Java template engine that emphasizes natural HTML
18
18
templates that can be previewed in a browser by double-clicking, which is very
@@ -33,7 +33,7 @@ http://forum.thymeleaf.org/Thymeleaf-3-0-8-JUST-PUBLISHED-td4030687.html[announc
33
33
34
34
[[webflux-view-freemarker]]
35
35
== FreeMarker
36
- [.small]#<<web.adoc#mvc-view-freemarker, Same as in Spring MVC>>#
36
+ [.small]#<<web.adoc#mvc-view-freemarker, Web MVC>>#
37
37
38
38
https://freemarker.apache.org/[Apache FreeMarker] is a template engine for generating any
39
39
kind of text output from HTML to email and others. The Spring Framework has built-in
@@ -43,7 +43,7 @@ integration for using Spring WebFlux with FreeMarker templates.
43
43
44
44
[[webflux-view-freemarker-contextconfig]]
45
45
=== View Configuration
46
- [.small]#<<web.adoc#mvc-view-freemarker-contextconfig, Same as in Spring MVC>>#
46
+ [.small]#<<web.adoc#mvc-view-freemarker-contextconfig, Web MVC>>#
47
47
48
48
The following example shows how to configure FreeMarker as a view technology:
49
49
@@ -98,7 +98,7 @@ returns the view name, `welcome`, the resolver looks for the
98
98
99
99
[[webflux-views-freemarker]]
100
100
=== FreeMarker Configuration
101
- [.small]#<<web.adoc#mvc-views-freemarker, Same as in Spring MVC>>#
101
+ [.small]#<<web.adoc#mvc-views-freemarker, Web MVC>>#
102
102
103
103
You can pass FreeMarker 'Settings' and 'SharedVariables' directly to the FreeMarker
104
104
`Configuration` object (which is managed by Spring) by setting the appropriate bean
@@ -151,7 +151,7 @@ the `Configuration` object.
151
151
152
152
[[webflux-view-freemarker-forms]]
153
153
=== Form Handling
154
- [.small]#<<web.adoc#mvc-view-freemarker-forms, Same as in Spring MVC>>#
154
+ [.small]#<<web.adoc#mvc-view-freemarker-forms, Web MVC>>#
155
155
156
156
Spring provides a tag library for use in JSPs that contains, among others, a
157
157
`<spring:bind/>` element. This element primarily lets forms display values from
@@ -162,7 +162,7 @@ with additional convenience macros for generating form input elements themselves
162
162
163
163
[[webflux-view-bind-macros]]
164
164
==== The Bind Macros
165
- [.small]#<<web.adoc#mvc-view-bind-macros, Same as in Spring MVC>>#
165
+ [.small]#<<web.adoc#mvc-view-bind-macros, Web MVC>>#
166
166
167
167
A standard set of macros are maintained within the `spring-webflux.jar` file for
168
168
FreeMarker, so they are always available to a suitably configured application.
@@ -193,7 +193,7 @@ sections of the Spring MVC documentation.
193
193
194
194
[[webflux-view-script]]
195
195
== Script Views
196
- [.small]#<<web.adoc#mvc-view-script, Same as in Spring MVC>>#
196
+ [.small]#<<web.adoc#mvc-view-script, Web MVC>>#
197
197
198
198
The Spring Framework has a built-in integration for using Spring WebFlux with any
199
199
templating library that can run on top of the
@@ -219,7 +219,7 @@ TIP: The basic rule for integrating any other script engine is that it must impl
219
219
220
220
[[webflux-view-script-dependencies]]
221
221
=== Requirements
222
- [.small]#<<web.adoc#mvc-view-script-dependencies, Same as in Spring MVC>>#
222
+ [.small]#<<web.adoc#mvc-view-script-dependencies, Web MVC>>#
223
223
224
224
You need to have the script engine on your classpath, the details of which vary by script engine:
225
225
@@ -239,7 +239,7 @@ through https://www.webjars.org/[WebJars].
239
239
240
240
[[webflux-view-script-integrate]]
241
241
=== Script Templates
242
- [.small]#<<web.adoc#mvc-view-script-integrate, Same as in Spring MVC>>#
242
+ [.small]#<<web.adoc#mvc-view-script-integrate, Web MVC>>#
243
243
244
244
You can declare a `ScriptTemplateConfigurer` bean to specify the script engine to use,
245
245
the script files to load, what function to call to render templates, and so on.
@@ -389,7 +389,7 @@ for more configuration examples.
389
389
390
390
[[webflux-view-httpmessagewriter]]
391
391
== JSON and XML
392
- [.small]#<<web.adoc#mvc-view-jackson, Same as in Spring MVC>>#
392
+ [.small]#<<web.adoc#mvc-view-jackson, Web MVC>>#
393
393
394
394
For <<webflux-multiple-representations>> purposes, it is useful to be able to alternate
395
395
between rendering a model with an HTML template or as other formats (such as JSON or XML),
0 commit comments