Skip to content

Commit ce53443

Browse files
committed
Polishing
1 parent 775a23b commit ce53443

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/result/view/ViewResolverSupport.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@
3535
public abstract class ViewResolverSupport implements Ordered {
3636

3737
/**
38-
* The default {@link MediaType content-type} for views.
38+
* The default {@link MediaType content-type} for views: {@code "text/html;charset=UTF-8"}.
3939
*/
4040
public static final MediaType DEFAULT_CONTENT_TYPE = MediaType.parseMediaType("text/html;charset=UTF-8");
4141

@@ -54,7 +54,7 @@ public ViewResolverSupport() {
5454

5555
/**
5656
* Set the supported media types for this view.
57-
* Default is "text/html;charset=UTF-8".
57+
* <p>Default is {@code "text/html;charset=UTF-8"}.
5858
*/
5959
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes) {
6060
Assert.notEmpty(supportedMediaTypes, "MediaType List must not be empty");
@@ -72,7 +72,7 @@ public List<MediaType> getSupportedMediaTypes() {
7272
/**
7373
* Set the default charset for this view, used when the
7474
* {@linkplain #setSupportedMediaTypes(List) content type} does not contain one.
75-
* Default is {@linkplain StandardCharsets#UTF_8 UTF 8}.
75+
* <p>Default is {@linkplain StandardCharsets#UTF_8 UTF-8}.
7676
*/
7777
public void setDefaultCharset(Charset defaultCharset) {
7878
Assert.notNull(defaultCharset, "Default Charset must not be null");

spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -196,9 +196,10 @@ protected String getSuffix() {
196196
}
197197

198198
/**
199-
* Set the content type for all views.
199+
* Set the content type for all views &mdash; for example,
200+
* {@code "text/html;charset=UTF-8"}.
200201
* <p>May be ignored by view classes if the view itself is assumed
201-
* to set the content type, e.g. in case of JSPs.
202+
* to set the content type &mdash; for example, in case of JSPs.
202203
*/
203204
public void setContentType(@Nullable String contentType) {
204205
this.contentType = contentType;

0 commit comments

Comments
 (0)