1
1
[[mvc-view]]
2
2
= View Technologies
3
- [.small]#<<web-reactive.adoc#webflux-view, WebFlux >>#
3
+ [.small]#<<web-reactive.adoc#webflux-view, See equivalent in the Reactive stack >>#
4
4
5
5
The use of view technologies in Spring MVC is pluggable. Whether you decide to use
6
6
Thymeleaf, Groovy Markup Templates, JSPs, or other technologies is primarily a matter of
@@ -14,7 +14,7 @@ the templates are editable by external sources, since this can have security imp
14
14
15
15
[[mvc-view-thymeleaf]]
16
16
== Thymeleaf
17
- [.small]#<<web-reactive.adoc#webflux-view-thymeleaf, WebFlux >>#
17
+ [.small]#<<web-reactive.adoc#webflux-view-thymeleaf, See equivalent in the Reactive stack >>#
18
18
19
19
Thymeleaf is a modern server-side Java template engine that emphasizes natural HTML
20
20
templates that can be previewed in a browser by double-clicking, which is very helpful
@@ -34,7 +34,7 @@ See https://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] for more deta
34
34
35
35
[[mvc-view-freemarker]]
36
36
== FreeMarker
37
- [.small]#<<web-reactive.adoc#webflux-view-freemarker, WebFlux >>#
37
+ [.small]#<<web-reactive.adoc#webflux-view-freemarker, See equivalent in the Reactive stack >>#
38
38
39
39
https://freemarker.apache.org/[Apache FreeMarker] is a template engine for generating any
40
40
kind of text output from HTML to email and others. The Spring Framework has built-in
@@ -44,7 +44,7 @@ integration for using Spring MVC with FreeMarker templates.
44
44
45
45
[[mvc-view-freemarker-contextconfig]]
46
46
=== View Configuration
47
- [.small]#<<web-reactive.adoc#webflux-view-freemarker-contextconfig, WebFlux >>#
47
+ [.small]#<<web-reactive.adoc#webflux-view-freemarker-contextconfig, See equivalent in the Reactive stack >>#
48
48
49
49
The following example shows how to configure FreeMarker as a view technology:
50
50
@@ -125,7 +125,7 @@ returns a view name of `welcome`, the resolver looks for the
125
125
126
126
[[mvc-views-freemarker]]
127
127
=== FreeMarker Configuration
128
- [.small]#<<web-reactive.adoc#webflux-views-freemarker, WebFlux >>#
128
+ [.small]#<<web-reactive.adoc#webflux-views-freemarker, See equivalent in the Reactive stack >>#
129
129
130
130
You can pass FreeMarker 'Settings' and 'SharedVariables' directly to the FreeMarker
131
131
`Configuration` object (which is managed by Spring) by setting the appropriate bean
@@ -164,7 +164,7 @@ with additional convenience macros for generating form input elements themselves
164
164
165
165
[[mvc-view-bind-macros]]
166
166
==== The Bind Macros
167
- [.small]#<<web-reactive.adoc#webflux-view-bind-macros, WebFlux >>#
167
+ [.small]#<<web-reactive.adoc#webflux-view-bind-macros, See equivalent in the Reactive stack >>#
168
168
169
169
A standard set of macros are maintained within the `spring-webmvc.jar` file for
170
170
FreeMarker, so they are always available to a suitably configured application.
@@ -576,7 +576,7 @@ syntax. The following example shows a sample template for an HTML page:
576
576
577
577
[[mvc-view-script]]
578
578
== Script Views
579
- [.small]#<<web-reactive.adoc#webflux-view-script, WebFlux >>#
579
+ [.small]#<<web-reactive.adoc#webflux-view-script, See equivalent in the Reactive stack >>#
580
580
581
581
The Spring Framework has a built-in integration for using Spring MVC with any
582
582
templating library that can run on top of the
@@ -602,7 +602,7 @@ TIP: The basic rule for integrating any other script engine is that it must impl
602
602
603
603
[[mvc-view-script-dependencies]]
604
604
=== Requirements
605
- [.small]#<<web-reactive.adoc#webflux-view-script-dependencies, WebFlux >>#
605
+ [.small]#<<web-reactive.adoc#webflux-view-script-dependencies, See equivalent in the Reactive stack >>#
606
606
607
607
You need to have the script engine on your classpath, the details of which vary by script engine:
608
608
@@ -622,7 +622,7 @@ through https://www.webjars.org/[WebJars].
622
622
623
623
[[mvc-view-script-integrate]]
624
624
=== Script Templates
625
- [.small]#<<web-reactive.adoc#webflux-view-script, WebFlux >>#
625
+ [.small]#<<web-reactive.adoc#webflux-view-script, See equivalent in the Reactive stack >>#
626
626
627
627
You can declare a `ScriptTemplateConfigurer` bean to specify the script engine to use,
628
628
the script files to load, what function to call to render templates, and so on.
@@ -1965,15 +1965,15 @@ an external definition (by name) or as a `View` instance from the handler method
1965
1965
1966
1966
[[mvc-view-jackson]]
1967
1967
== Jackson
1968
- [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux >>#
1968
+ [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack >>#
1969
1969
1970
1970
Spring offers support for the Jackson JSON library.
1971
1971
1972
1972
1973
1973
1974
1974
[[mvc-view-json-mapping]]
1975
1975
=== Jackson-based JSON MVC Views
1976
- [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux >>#
1976
+ [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack >>#
1977
1977
1978
1978
The `MappingJackson2JsonView` uses the Jackson library's `ObjectMapper` to render the response
1979
1979
content as JSON. By default, the entire contents of the model map (with the exception of
@@ -1992,7 +1992,7 @@ serializers and deserializers for specific types.
1992
1992
1993
1993
[[mvc-view-xml-mapping]]
1994
1994
=== Jackson-based XML Views
1995
- [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux >>#
1995
+ [.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack >>#
1996
1996
1997
1997
`MappingJackson2XmlView` uses the
1998
1998
https://github.com/FasterXML/jackson-dataformat-xml[Jackson XML extension's] `XmlMapper`
0 commit comments