Skip to content

Commit 8be7d3c

Browse files
committed
Polish
1 parent 250eb67 commit 8be7d3c

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,10 @@ public ThymeleafReactiveViewResolver thymeleafViewResolver(
264264
resolver.setResponseMaxChunkSizeBytes(
265265
this.properties.getReactive().getMaxChunkSize());
266266
}
267-
resolver.setFullModeViewNames(this.properties.getReactive().getFullModeViewNames());
268-
resolver.setChunkedModeViewNames(this.properties.getReactive().getChunkedModeViewNames());
267+
resolver.setFullModeViewNames(
268+
this.properties.getReactive().getFullModeViewNames());
269+
resolver.setChunkedModeViewNames(
270+
this.properties.getReactive().getChunkedModeViewNames());
269271
// This resolver acts as a fallback resolver (e.g. like a
270272
// InternalResourceViewResolver) so it needs to have low precedence
271273
resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public class ThymeleafProperties {
8989
private String[] viewNames;
9090

9191
/**
92-
* Comma-separated list of view names (patterns allowed) that should be excluded from resolution.
92+
* Comma-separated list of view names (patterns allowed) that should be excluded from
93+
* resolution.
9394
*/
9495
private String[] excludedViewNames;
9596

@@ -218,8 +219,8 @@ public void setContentType(MimeType contentType) {
218219
public static class Reactive {
219220

220221
/**
221-
* Maximum size of data buffers used for writing to the response, in bytes. Templates will
222-
* execute in CHUNKED mode by default if this is set a value.
222+
* Maximum size of data buffers used for writing to the response, in bytes.
223+
* Templates will execute in CHUNKED mode by default if this is set a value.
223224
*/
224225
private int maxChunkSize;
225226

@@ -229,18 +230,17 @@ public static class Reactive {
229230
private List<MediaType> mediaTypes;
230231

231232
/**
232-
* Comma-separated list of view names (patterns allowed) that should be executed in FULL mode
233-
* even if a max chunk size is set.
233+
* Comma-separated list of view names (patterns allowed) that should be executed
234+
* in FULL mode even if a max chunk size is set.
234235
*/
235236
private String[] fullModeViewNames;
236237

237238
/**
238-
* Comma-separated list of view names (patterns allowed) that should be the only ones executed
239-
* in CHUNKED mode when a max chunk size is set.
239+
* Comma-separated list of view names (patterns allowed) that should be the only
240+
* ones executed in CHUNKED mode when a max chunk size is set.
240241
*/
241242
private String[] chunkedModeViewNames;
242243

243-
244244
public List<MediaType> getMediaTypes() {
245245
return this.mediaTypes;
246246
}

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafReactiveAutoConfigurationTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,21 @@ public void overrideMaxChunkSize() throws Exception {
122122

123123
@Test
124124
public void overrideFullModeViewNames() throws Exception {
125-
load(BaseConfiguration.class, "spring.thymeleaf.reactive.fullModeViewNames:foo,bar");
125+
load(BaseConfiguration.class,
126+
"spring.thymeleaf.reactive.fullModeViewNames:foo,bar");
126127
ThymeleafReactiveViewResolver views = this.context
127128
.getBean(ThymeleafReactiveViewResolver.class);
128129
assertThat(views.getFullModeViewNames()).isEqualTo(new String[] { "foo", "bar" });
129130
}
130131

131132
@Test
132133
public void overrideChunkedModeViewNames() throws Exception {
133-
load(BaseConfiguration.class, "spring.thymeleaf.reactive.chunkedModeViewNames:foo,bar");
134+
load(BaseConfiguration.class,
135+
"spring.thymeleaf.reactive.chunkedModeViewNames:foo,bar");
134136
ThymeleafReactiveViewResolver views = this.context
135137
.getBean(ThymeleafReactiveViewResolver.class);
136-
assertThat(views.getChunkedModeViewNames()).isEqualTo(new String[] { "foo", "bar" });
138+
assertThat(views.getChunkedModeViewNames())
139+
.isEqualTo(new String[] { "foo", "bar" });
137140
}
138141

139142
@Test

0 commit comments

Comments
 (0)