Polishing
This commit is contained in:
parent
775a23b39d
commit
ce53443cf0
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2021 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -35,7 +35,7 @@ import org.springframework.util.Assert;
|
||||||
public abstract class ViewResolverSupport implements Ordered {
|
public abstract class ViewResolverSupport implements Ordered {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link MediaType content-type} for views.
|
* The default {@link MediaType content-type} for views: {@code "text/html;charset=UTF-8"}.
|
||||||
*/
|
*/
|
||||||
public static final MediaType DEFAULT_CONTENT_TYPE = MediaType.parseMediaType("text/html;charset=UTF-8");
|
public static final MediaType DEFAULT_CONTENT_TYPE = MediaType.parseMediaType("text/html;charset=UTF-8");
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ public abstract class ViewResolverSupport implements Ordered {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the supported media types for this view.
|
* Set the supported media types for this view.
|
||||||
* Default is "text/html;charset=UTF-8".
|
* <p>Default is {@code "text/html;charset=UTF-8"}.
|
||||||
*/
|
*/
|
||||||
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes) {
|
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes) {
|
||||||
Assert.notEmpty(supportedMediaTypes, "MediaType List must not be empty");
|
Assert.notEmpty(supportedMediaTypes, "MediaType List must not be empty");
|
||||||
|
|
@ -72,7 +72,7 @@ public abstract class ViewResolverSupport implements Ordered {
|
||||||
/**
|
/**
|
||||||
* Set the default charset for this view, used when the
|
* Set the default charset for this view, used when the
|
||||||
* {@linkplain #setSupportedMediaTypes(List) content type} does not contain one.
|
* {@linkplain #setSupportedMediaTypes(List) content type} does not contain one.
|
||||||
* Default is {@linkplain StandardCharsets#UTF_8 UTF 8}.
|
* <p>Default is {@linkplain StandardCharsets#UTF_8 UTF-8}.
|
||||||
*/
|
*/
|
||||||
public void setDefaultCharset(Charset defaultCharset) {
|
public void setDefaultCharset(Charset defaultCharset) {
|
||||||
Assert.notNull(defaultCharset, "Default Charset must not be null");
|
Assert.notNull(defaultCharset, "Default Charset must not be null");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -196,9 +196,10 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the content type for all views.
|
* Set the content type for all views — for example,
|
||||||
|
* {@code "text/html;charset=UTF-8"}.
|
||||||
* <p>May be ignored by view classes if the view itself is assumed
|
* <p>May be ignored by view classes if the view itself is assumed
|
||||||
* to set the content type, e.g. in case of JSPs.
|
* to set the content type — for example, in case of JSPs.
|
||||||
*/
|
*/
|
||||||
public void setContentType(@Nullable String contentType) {
|
public void setContentType(@Nullable String contentType) {
|
||||||
this.contentType = contentType;
|
this.contentType = contentType;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue