Update Content-Type based on encoding in MVC FreeMarkerView
Closes gh-33119
This commit is contained in:
@@ -24,6 +24,8 @@ import freemarker.template.Configuration;
|
||||
*
|
||||
* <p>Detected and used by {@link FreeMarkerView}.
|
||||
*
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.26 or higher.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,7 @@ import org.springframework.util.Assert;
|
||||
* <@spring.bind "person.age"/>
|
||||
* age is ${spring.status.value}</pre>
|
||||
*
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.21 or higher.
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.26 or higher.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
|
||||
@@ -90,7 +90,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* sets the supported media type to {@code "text/html;charset=UTF-8"} by default.
|
||||
* Thus, those default values are likely suitable for most applications.
|
||||
*
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.21 or higher.
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.26 or higher.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sam Brannen
|
||||
@@ -158,7 +158,7 @@ public class FreeMarkerView extends AbstractUrlBasedView {
|
||||
* <p>If the encoding is not explicitly set here or in the FreeMarker
|
||||
* {@code Configuration}, FreeMarker will read template files using the platform
|
||||
* file encoding (defined by the JVM system property {@code file.encoding})
|
||||
* or {@code "utf-8"} if the platform file encoding is undefined. Note,
|
||||
* or UTF-8 if the platform file encoding is undefined. Note,
|
||||
* however, that {@link FreeMarkerConfigurer} sets the default encoding in the
|
||||
* FreeMarker {@code Configuration} to "UTF-8".
|
||||
* <p>It's recommended to specify the encoding in the FreeMarker {@code Configuration}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,6 +26,8 @@ import org.springframework.web.reactive.result.view.UrlBasedViewResolver;
|
||||
* <p>The view class for all views generated by this resolver can be specified
|
||||
* via the "viewClass" property. See {@link UrlBasedViewResolver} for details.
|
||||
*
|
||||
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3.26 or higher.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user