parent
6120076437
commit
3ba9d35e22
|
@ -385,7 +385,7 @@ To customize the default message, you can add properties to
|
|||
xref:core/beans/context-introduction.adoc#context-functionality-messagesource[MessageSource]
|
||||
resource bundles using any of the above errors codes and message arguments. Note also that the
|
||||
message argument `"name"` is itself a `MessageSourceResolvable` with error codes
|
||||
`"person.name"` and `"name"` and can customized too. For example:
|
||||
`"person.name"` and `"name"` and can be customized too. For example:
|
||||
|
||||
Properties::
|
||||
+
|
||||
|
|
|
@ -160,7 +160,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
|||
/** Map from scope identifier String to corresponding Scope. */
|
||||
private final Map<String, Scope> scopes = new LinkedHashMap<>(8);
|
||||
|
||||
/** Application startup metrics. **/
|
||||
/** Application startup metrics. */
|
||||
private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
|
||||
|
||||
/** Map from bean name to merged RootBeanDefinition. */
|
||||
|
|
|
@ -234,7 +234,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
@Nullable
|
||||
private ApplicationEventMulticaster applicationEventMulticaster;
|
||||
|
||||
/** Application startup metrics. **/
|
||||
/** Application startup metrics. */
|
||||
private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
|
||||
|
||||
/** Statically specified listeners. */
|
||||
|
|
|
@ -107,7 +107,7 @@ class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
|||
* The write subscriber has subscribed, and cached signals have been
|
||||
* emitted to it; we're ready to switch to a simple pass-through mode
|
||||
* for all remaining signals.
|
||||
**/
|
||||
*/
|
||||
READY_TO_WRITE
|
||||
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class MockCookie extends Cookie {
|
|||
|
||||
private static final String SAME_SITE = "SameSite";
|
||||
private static final String EXPIRES = "Expires";
|
||||
private static final String PARTITIONED = "Partitioned";
|
||||
|
||||
@Nullable
|
||||
private ZonedDateTime expires;
|
||||
|
@ -105,10 +106,10 @@ public class MockCookie extends Cookie {
|
|||
*/
|
||||
public void setPartitioned(boolean partitioned) {
|
||||
if (partitioned) {
|
||||
setAttribute("Partitioned", "");
|
||||
setAttribute(PARTITIONED, "");
|
||||
}
|
||||
else {
|
||||
setAttribute("Partitioned", null);
|
||||
setAttribute(PARTITIONED, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +119,7 @@ public class MockCookie extends Cookie {
|
|||
* @see <a href="https://datatracker.ietf.org/doc/html/draft-cutler-httpbis-partitioned-cookies#section-2.1">The Partitioned attribute spec</a>
|
||||
*/
|
||||
public boolean isPartitioned() {
|
||||
return getAttribute("Partitioned") != null;
|
||||
return getAttribute(PARTITIONED) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -207,7 +208,7 @@ public class MockCookie extends Cookie {
|
|||
.append("Comment", getComment())
|
||||
.append("Secure", getSecure())
|
||||
.append("HttpOnly", isHttpOnly())
|
||||
.append("Partitioned", isPartitioned())
|
||||
.append(PARTITIONED, isPartitioned())
|
||||
.append(SAME_SITE, getSameSite())
|
||||
.append("Max-Age", getMaxAge())
|
||||
.append(EXPIRES, getAttribute(EXPIRES))
|
||||
|
|
|
@ -51,7 +51,7 @@ public class JdkClientHttpConnector implements ClientHttpConnector {
|
|||
private DataBufferFactory bufferFactory = DefaultDataBufferFactory.sharedInstance;
|
||||
|
||||
@Nullable
|
||||
private Duration readTimeout = null;
|
||||
private Duration readTimeout;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -99,7 +99,7 @@ public class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
|||
* The write subscriber has subscribed, and cached signals have been
|
||||
* emitted to it; we're ready to switch to a simple pass-through mode
|
||||
* for all remaining signals.
|
||||
**/
|
||||
*/
|
||||
READY_TO_WRITE
|
||||
|
||||
}
|
||||
|
|
|
@ -70,10 +70,10 @@ public class RequestAttributesThreadLocalAccessor implements ThreadLocalAccessor
|
|||
|
||||
/**
|
||||
* ServletRequestAttributes that takes another instance, and makes a copy of the
|
||||
* request attributes at present to provides extended read access during async
|
||||
* request attributes at present to provide extended read access during async
|
||||
* handling when the DispatcherServlet has exited from the initial REQUEST dispatch
|
||||
* and marked the request {@link ServletRequestAttributes#requestCompleted()}.
|
||||
* <p>Note that beyond access to request attributes, here is no attempt to support
|
||||
* <p>Note that beyond access to request attributes, there is no attempt to support
|
||||
* setting or removing request attributes, nor to access session attributes after
|
||||
* the initial REQUEST dispatch has exited.
|
||||
*/
|
||||
|
|
|
@ -174,7 +174,7 @@ class Jackson2JsonDecoderTests extends AbstractDecoderTests<Jackson2JsonDecoder>
|
|||
}
|
||||
|
||||
@Test
|
||||
protected void decodeToFluxWithListElements() {
|
||||
void decodeToFluxWithListElements() {
|
||||
Flux<DataBuffer> input = Flux.concat(
|
||||
stringBuffer("[{\"bar\":\"b1\",\"foo\":\"f1\"},{\"bar\":\"b2\",\"foo\":\"f2\"}]"),
|
||||
stringBuffer("[{\"bar\":\"b3\",\"foo\":\"f3\"},{\"bar\":\"b4\",\"foo\":\"f4\"}]"));
|
||||
|
|
|
@ -17,15 +17,12 @@
|
|||
package org.springframework.web.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.util.FastByteArrayOutputStream;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import org.springframework.web.testfixture.servlet.MockHttpServletRequest;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
@ -95,13 +92,7 @@ class ContentCachingRequestWrapperTests {
|
|||
@Test
|
||||
void shouldNotAllocateMoreThanCacheLimit() throws Exception {
|
||||
ContentCachingRequestWrapper wrapper = new ContentCachingRequestWrapper(createGetRequest("Hello World"), CONTENT_CACHE_LIMIT);
|
||||
Field field = ReflectionUtils.findField(ContentCachingRequestWrapper.class, "cachedContent");
|
||||
ReflectionUtils.makeAccessible(field);
|
||||
FastByteArrayOutputStream cachedContent = (FastByteArrayOutputStream) ReflectionUtils.getField(field, wrapper);
|
||||
field = ReflectionUtils.findField(FastByteArrayOutputStream.class, "initialBlockSize");
|
||||
ReflectionUtils.makeAccessible(field);
|
||||
int blockSize = (int) ReflectionUtils.getField(field, cachedContent);
|
||||
assertThat(blockSize).isEqualTo(CONTENT_CACHE_LIMIT);
|
||||
assertThat(wrapper).extracting("cachedContent.initialBlockSize").isEqualTo(CONTENT_CACHE_LIMIT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ public class MockCookie extends Cookie {
|
|||
|
||||
private static final String SAME_SITE = "SameSite";
|
||||
private static final String EXPIRES = "Expires";
|
||||
private static final String PARTITIONED = "Partitioned";
|
||||
|
||||
@Nullable
|
||||
private ZonedDateTime expires;
|
||||
|
@ -105,10 +106,10 @@ public class MockCookie extends Cookie {
|
|||
*/
|
||||
public void setPartitioned(boolean partitioned) {
|
||||
if (partitioned) {
|
||||
setAttribute("Partitioned", "");
|
||||
setAttribute(PARTITIONED, "");
|
||||
}
|
||||
else {
|
||||
setAttribute("Partitioned", null);
|
||||
setAttribute(PARTITIONED, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +119,7 @@ public class MockCookie extends Cookie {
|
|||
* @see <a href="https://datatracker.ietf.org/doc/html/draft-cutler-httpbis-partitioned-cookies#section-2.1">The Partitioned attribute spec</a>
|
||||
*/
|
||||
public boolean isPartitioned() {
|
||||
return getAttribute("Partitioned") != null;
|
||||
return getAttribute(PARTITIONED) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -202,7 +203,7 @@ public class MockCookie extends Cookie {
|
|||
.append("Comment", getComment())
|
||||
.append("Secure", getSecure())
|
||||
.append("HttpOnly", isHttpOnly())
|
||||
.append("Partitioned", isPartitioned())
|
||||
.append(PARTITIONED, isPartitioned())
|
||||
.append(SAME_SITE, getSameSite())
|
||||
.append("Max-Age", getMaxAge())
|
||||
.append(EXPIRES, getAttribute(EXPIRES))
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.springframework.lang.Nullable;
|
|||
|
||||
/**
|
||||
* Abstract base class for URL-based views. Provides a consistent way of
|
||||
* holding the URL that a View wraps, in the form of an "url" bean property.
|
||||
* holding the URL that a View wraps, in the form of a "url" bean property.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 13.12.2003
|
||||
|
|
Loading…
Reference in New Issue