Skip to content

Commit 973e23d

Browse files
committed
Adapt to upstream Spring Framework changes
1 parent 41c1d9f commit 973e23d

File tree

1 file changed

+3
-1
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/result/view

1 file changed

+3
-1
lines changed

Diff for: spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/result/view/MustacheView.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.springframework.core.io.Resource;
3535
import org.springframework.core.io.buffer.DataBuffer;
3636
import org.springframework.core.io.buffer.DataBufferUtils;
37+
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
3738
import org.springframework.http.MediaType;
3839
import org.springframework.web.reactive.result.view.AbstractUrlBasedView;
3940
import org.springframework.web.reactive.result.view.View;
@@ -81,7 +82,8 @@ protected Mono<Void> renderInternal(Map<String, Object> model, MediaType content
8182
return Mono
8283
.error(new IllegalStateException("Could not find Mustache template with URL [" + getUrl() + "]"));
8384
}
84-
DataBuffer dataBuffer = exchange.getResponse().bufferFactory().allocateBuffer();
85+
DataBuffer dataBuffer = exchange.getResponse().bufferFactory()
86+
.allocateBuffer(DefaultDataBufferFactory.DEFAULT_INITIAL_CAPACITY);
8587
try (Reader reader = getReader(resource)) {
8688
Template template = this.compiler.compile(reader);
8789
Charset charset = getCharset(contentType).orElseGet(this::getDefaultCharset);

0 commit comments

Comments
 (0)