Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
032096d699
commit
e0480f75ac
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -441,12 +441,12 @@ public class ContentDisposition {
|
||||
public interface Builder {
|
||||
|
||||
/**
|
||||
* Set the value of the {@literal name} parameter
|
||||
* Set the value of the {@literal name} parameter.
|
||||
*/
|
||||
Builder name(String name);
|
||||
|
||||
/**
|
||||
* Set the value of the {@literal filename} parameter
|
||||
* Set the value of the {@literal filename} parameter.
|
||||
*/
|
||||
Builder filename(String filename);
|
||||
|
||||
@@ -463,7 +463,7 @@ public class ContentDisposition {
|
||||
Builder filename(String filename, Charset charset);
|
||||
|
||||
/**
|
||||
* Set the value of the {@literal size} parameter
|
||||
* Set the value of the {@literal size} parameter.
|
||||
*/
|
||||
Builder size(Long size);
|
||||
|
||||
@@ -483,7 +483,7 @@ public class ContentDisposition {
|
||||
Builder readDate(ZonedDateTime readDate);
|
||||
|
||||
/**
|
||||
* Build the content disposition
|
||||
* Build the content disposition.
|
||||
*/
|
||||
ContentDisposition build();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,6 +50,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0.2
|
||||
* @param <T> the body type
|
||||
* @see org.springframework.web.client.RestTemplate
|
||||
* @see #getBody()
|
||||
* @see #getHeaders()
|
||||
|
||||
@@ -172,7 +172,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
*/
|
||||
public static final String CONTENT_ENCODING = "Content-Encoding";
|
||||
/**
|
||||
* The HTTP {@code Content-Disposition} header field name
|
||||
* The HTTP {@code Content-Disposition} header field name.
|
||||
* @see <a href="http://tools.ietf.org/html/rfc6266">RFC 6266</a>
|
||||
*/
|
||||
public static final String CONTENT_DISPOSITION = "Content-Disposition";
|
||||
@@ -378,7 +378,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
|
||||
|
||||
/**
|
||||
* Pattern matching ETag multiple field values in headers such as "If-Match", "If-None-Match"
|
||||
* Pattern matching ETag multiple field values in headers such as "If-Match", "If-None-Match".
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7232#section-2.3">Section 2.3 of RFC 7232</a>
|
||||
*/
|
||||
private static final Pattern ETAG_HEADER_VALUE_PATTERN = Pattern.compile("\\*|\\s*((W\\/)?(\"[^\"]*\"))\\s*,?");
|
||||
@@ -388,7 +388,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
private static final ZoneId GMT = ZoneId.of("GMT");
|
||||
|
||||
/**
|
||||
* Date formats with time zone as specified in the HTTP RFC
|
||||
* Date formats with time zone as specified in the HTTP RFC.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.1.1">Section 7.1.1.1 of RFC 7231</a>
|
||||
*/
|
||||
private static final DateTimeFormatter[] DATE_FORMATTERS = new DateTimeFormatter[] {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -60,6 +60,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.1
|
||||
* @param <T> the body type
|
||||
* @see #getMethod()
|
||||
* @see #getUrl()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -64,6 +64,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* @author Arjen Poutsma
|
||||
* @author Brian Clozel
|
||||
* @since 3.0.2
|
||||
* @param <T> the body type
|
||||
* @see #getStatusCode()
|
||||
*/
|
||||
public class ResponseEntity<T> extends HttpEntity<T> {
|
||||
@@ -293,8 +294,8 @@ public class ResponseEntity<T> extends HttpEntity<T> {
|
||||
|
||||
/**
|
||||
* Defines a builder that adds headers to the response entity.
|
||||
* @param <B> the builder subclass
|
||||
* @since 4.1
|
||||
* @param <B> the builder subclass
|
||||
*/
|
||||
public interface HeadersBuilder<B extends HeadersBuilder<B>> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Wrapper for a {@link AsyncClientHttpRequestFactory} that has support for
|
||||
* {@link AsyncClientHttpRequestInterceptor}s.
|
||||
* {@link AsyncClientHttpRequestInterceptor AsyncClientHttpRequestInterceptors}.
|
||||
*
|
||||
* @author Jakub Narloch
|
||||
* @since 4.3
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* Wrapper for a {@link ClientHttpRequest} that has support for {@link ClientHttpRequestInterceptor}s.
|
||||
* Wrapper for a {@link ClientHttpRequest} that has support for {@link ClientHttpRequestInterceptor ClientHttpRequest} that has support for {@link ClientHttpRequestInterceptors}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.http.HttpMethod;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptor}s.
|
||||
* {@link ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptor ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptors}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.1
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* Resource image = new ClassPathResource("image.jpg");
|
||||
* builder.part("image", image).header("Baz", "Qux");
|
||||
*
|
||||
* MultiValueMap<String, HttpEntity<?>> multipartBody = builder.build();
|
||||
* MultiValueMap<String, HttpEntity<?>> multipartBody = builder.build();
|
||||
* // use multipartBody with RestTemplate or WebClient
|
||||
* </pre>
|
||||
|
||||
@@ -260,8 +260,8 @@ public final class MultipartBodyBuilder {
|
||||
* Specialization of {@link HttpEntity} for use with a
|
||||
* {@link Publisher}-based body, for which we also need to keep track of
|
||||
* the element type.
|
||||
* @param <T> The type contained in the publisher
|
||||
* @param <P> The publisher
|
||||
* @param <T> the type contained in the publisher
|
||||
* @param <P> the publisher
|
||||
*/
|
||||
public static final class PublisherEntity<T, P extends Publisher<T>> extends HttpEntity<P> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -115,8 +115,8 @@ public class Netty4ClientHttpRequestFactory implements ClientHttpRequestFactory,
|
||||
/**
|
||||
* Set the default maximum response size.
|
||||
* <p>By default this is set to {@link #DEFAULT_MAX_RESPONSE_SIZE}.
|
||||
* @see HttpObjectAggregator#HttpObjectAggregator(int)
|
||||
* @since 4.1.5
|
||||
* @see HttpObjectAggregator#HttpObjectAggregator(int)
|
||||
*/
|
||||
public void setMaxResponseSize(int maxResponseSize) {
|
||||
this.maxResponseSize = maxResponseSize;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class HttpAccessor {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private ClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,6 +45,7 @@ import org.springframework.util.Assert;
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects in the decoded output stream
|
||||
*/
|
||||
public class DecoderHttpMessageReader<T> implements HttpMessageReader<T> {
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.springframework.util.Assert;
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects in the input stream
|
||||
*/
|
||||
public class EncoderHttpMessageWriter<T> implements HttpMessageWriter<T> {
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ import org.springframework.util.StringUtils;
|
||||
public class FormHttpMessageReader extends LoggingCodecSupport
|
||||
implements HttpMessageReader<MultiValueMap<String, String>> {
|
||||
|
||||
/**
|
||||
* The default charset used by the reader.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
private static final ResolvableType MULTIVALUE_TYPE =
|
||||
|
||||
@@ -61,6 +61,9 @@ import org.springframework.util.MultiValueMap;
|
||||
public class FormHttpMessageWriter extends LoggingCodecSupport
|
||||
implements HttpMessageWriter<MultiValueMap<String, String>> {
|
||||
|
||||
/**
|
||||
* The default charset used by the writer.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
private static final MediaType DEFAULT_FORM_DATA_MEDIA_TYPE =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of elements in the output stream
|
||||
*/
|
||||
public interface HttpMessageDecoder<T> extends Decoder<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of elements in the input stream
|
||||
*/
|
||||
public interface HttpMessageEncoder<T> extends Encoder<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,12 +34,11 @@ import org.springframework.lang.Nullable;
|
||||
* Strategy for reading from a {@link ReactiveHttpInputMessage} and decoding
|
||||
* the stream of bytes to Objects of type {@code <T>}.
|
||||
*
|
||||
* @param <T> the type of objects in the decoded output stream
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects in the decoded output stream
|
||||
*/
|
||||
public interface HttpMessageReader<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,12 +34,11 @@ import org.springframework.lang.Nullable;
|
||||
* Strategy for encoding a stream of objects of type {@code <T>} and writing
|
||||
* the encoded stream of bytes to an {@link ReactiveHttpOutputMessage}.
|
||||
*
|
||||
* @param <T> the type of objects in the input stream
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects in the input stream
|
||||
*/
|
||||
public interface HttpMessageWriter<T> {
|
||||
|
||||
|
||||
@@ -25,11 +25,10 @@ import org.springframework.lang.Nullable;
|
||||
* {@code Flux<ServerSentEvent>} or {@code Observable<ServerSentEvent>} is the
|
||||
* reactive equivalent to Spring MVC's {@code SseEmitter}.
|
||||
*
|
||||
* @param <T> the type of data that this event contains
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @param <T> the type of data that this event contains
|
||||
* @see ServerSentEventHttpMessageWriter
|
||||
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
|
||||
*/
|
||||
|
||||
@@ -37,8 +37,8 @@ import org.springframework.http.ReactiveHttpInputMessage;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Reader that supports a stream of {@link ServerSentEvent}s and also plain
|
||||
* {@link Object}s which is the same as an {@link ServerSentEvent} with data only.
|
||||
* Reader that supports a stream of {@link ServerSentEvent ServerSentEvents} and also plain
|
||||
* {@link Object Objects} which is the same as an {@link ServerSentEvent} with data only.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -81,9 +81,12 @@ import org.springframework.util.MultiValueMap;
|
||||
public class MultipartHttpMessageWriter extends LoggingCodecSupport
|
||||
implements HttpMessageWriter<MultiValueMap<String, ?>> {
|
||||
|
||||
/**
|
||||
* THe default charset used by the writer.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
/** Suppress logging from individual part writers (full map logged at this level) */
|
||||
/** Suppress logging from individual part writers (full map logged at this level). */
|
||||
private static final Map<String, Object> DEFAULT_HINTS =
|
||||
Collections.singletonMap(Log.class.getName(), new NoOpLog());
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link ServerCodecConfigurer.ServerDefaultCodecs}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
class ServerDefaultCodecsImpl extends BaseDefaultCodecs implements ServerCodecConfigurer.ServerDefaultCodecs {
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ public class Jaxb2XmlDecoder extends AbstractDecoder<Object> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Split a flux of {@link XMLEvent}s into a flux of XMLEvent lists, one list
|
||||
* Split a flux of {@link XMLEvent XMLEvents} into a flux of XMLEvent lists, one list
|
||||
* for each branch of the tree that starts with the given qualified name.
|
||||
* That is, given the XMLEvents shown {@linkplain XmlEventDecoder here},
|
||||
* and the {@code desiredName} "{@code child}", this method returns a flux
|
||||
|
||||
@@ -47,14 +47,14 @@ import org.springframework.util.MimeTypeUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
/**
|
||||
* Decodes a {@link DataBuffer} stream into a stream of {@link XMLEvent}s.
|
||||
* Decodes a {@link DataBuffer} stream into a stream of {@link XMLEvent DataBuffer} stream into a stream of {@link XMLEvents}.
|
||||
* That is, given the following XML:
|
||||
*
|
||||
* <pre>{@code
|
||||
* <root>
|
||||
* <child>foo</child>
|
||||
* <child>bar</child>
|
||||
* </root>}
|
||||
* <pre>
|
||||
* <root>
|
||||
* <child>foo</child>
|
||||
* <child>bar</child>
|
||||
* </root>
|
||||
* </pre>
|
||||
*
|
||||
* this method with result in a flux with the following events:
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Sebastien Deleuze
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.2
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public abstract class AbstractGenericHttpMessageConverter<T> extends AbstractHttpMessageConverter<T>
|
||||
implements GenericHttpMessageConverter<T> {
|
||||
|
||||
@@ -46,10 +46,11 @@ import org.springframework.util.Assert;
|
||||
* @author Juergen Hoeller
|
||||
* @author Sebastien Deleuze
|
||||
* @since 3.0
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public abstract class AbstractHttpMessageConverter<T> implements HttpMessageConverter<T> {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private List<MediaType> supportedMediaTypes = Collections.emptyList();
|
||||
|
||||
@@ -93,6 +93,9 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class FormHttpMessageConverter implements HttpMessageConverter<MultiValueMap<String, ?>> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
private static final MediaType DEFAULT_FORM_DATA_MEDIA_TYPE =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sebastien Deleuze
|
||||
* @since 3.2
|
||||
* @param <T> the converted object type
|
||||
* @see org.springframework.core.ParameterizedTypeReference
|
||||
*/
|
||||
public interface GenericHttpMessageConverter<T> extends HttpMessageConverter<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public interface HttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,9 @@ import org.springframework.util.StreamUtils;
|
||||
*/
|
||||
public class StringHttpMessageConverter extends AbstractHttpMessageConverter<String> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.ISO_8859_1;
|
||||
|
||||
|
||||
@@ -105,7 +108,7 @@ public class StringHttpMessageConverter extends AbstractHttpMessageConverter<Str
|
||||
|
||||
|
||||
/**
|
||||
* Return the list of supported {@link Charset}s.
|
||||
* Return the list of supported {@link Charset Charsets}.
|
||||
* <p>By default, returns {@link Charset#availableCharsets()}.
|
||||
* Can be overridden in subclasses.
|
||||
* @return the list of accepted charsets
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,17 +41,21 @@ import org.springframework.util.StringUtils;
|
||||
* Abstract base class for Atom and RSS Feed message converters, using the
|
||||
* <a href="https://github.com/rometools/rome">ROME tools</a> project.
|
||||
*
|
||||
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0.2
|
||||
* @param <T> the converted object type
|
||||
* @see AtomFeedHttpMessageConverter
|
||||
* @see RssChannelHttpMessageConverter
|
||||
*/
|
||||
public abstract class AbstractWireFeedHttpMessageConverter<T extends WireFeed>
|
||||
extends AbstractHttpMessageConverter<T> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ import org.springframework.util.TypeUtils;
|
||||
*/
|
||||
public abstract class AbstractJackson2HttpMessageConverter extends AbstractGenericHttpMessageConverter<Object> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ import org.springframework.lang.Nullable;
|
||||
*/
|
||||
public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHttpMessageConverter<Object> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -310,7 +310,7 @@ public class Jackson2ObjectMapperBuilder {
|
||||
|
||||
/**
|
||||
* Add mix-in annotations to use for augmenting specified class or interface.
|
||||
* @param mixIns Map of entries with target classes (or interface) whose annotations
|
||||
* @param mixIns a Map of entries with target classes (or interface) whose annotations
|
||||
* to effectively override as key and mix-in classes (or interface) whose
|
||||
* annotations are to be "added" to target's annotations as value.
|
||||
* @since 4.1.2
|
||||
@@ -339,8 +339,8 @@ public class Jackson2ObjectMapperBuilder {
|
||||
|
||||
/**
|
||||
* Configure a custom serializer for the given type.
|
||||
* @see #serializers(JsonSerializer...)
|
||||
* @since 4.1.2
|
||||
* @see #serializers(JsonSerializer...)
|
||||
*/
|
||||
public Jackson2ObjectMapperBuilder serializerByType(Class<?> type, JsonSerializer<?> serializer) {
|
||||
this.serializers.put(type, serializer);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -261,7 +261,7 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean<ObjectMapper
|
||||
|
||||
/**
|
||||
* Add mix-in annotations to use for augmenting specified class or interface.
|
||||
* @param mixIns Map of entries with target classes (or interface) whose annotations
|
||||
* @param mixIns a Map of entries with target classes (or interface) whose annotations
|
||||
* to effectively override as key and mix-in classes (or interface) whose
|
||||
* annotations are to be "added" to target's annotations as value.
|
||||
* @since 4.1.2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ import com.google.protobuf.ExtensionRegistry;
|
||||
public interface ExtensionRegistryInitializer {
|
||||
|
||||
/**
|
||||
* Initializes the {@code ExtensionRegistry} with Protocol Message extensions
|
||||
* Initializes the {@code ExtensionRegistry} with Protocol Message extensions.
|
||||
* @param registry the registry to populate
|
||||
*/
|
||||
void initializeExtensionRegistry(ExtensionRegistry registry);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@ import org.springframework.util.ClassUtils;
|
||||
import static org.springframework.http.MediaType.*;
|
||||
|
||||
/**
|
||||
* An {@code HttpMessageConverter} that reads and writes {@link com.google.protobuf.Message}s
|
||||
* An {@code HttpMessageConverter} that reads and writes {@link com.google.protobuf.Message com.google.protobuf.Messages}
|
||||
* using <a href="https://developers.google.com/protocol-buffers/">Google Protocol Buffers</a>.
|
||||
*
|
||||
* <p>To generate {@code Message} Java classes, you need to install the {@code protoc} binary.
|
||||
@@ -78,12 +78,24 @@ import static org.springframework.http.MediaType.*;
|
||||
*/
|
||||
public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<Message> {
|
||||
|
||||
/**
|
||||
* The default charset used by the converter.
|
||||
*/
|
||||
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
/**
|
||||
* The media-type for protobuf {@code application/x-protobuf}.
|
||||
*/
|
||||
public static final MediaType PROTOBUF = new MediaType("application", "x-protobuf", DEFAULT_CHARSET);
|
||||
|
||||
/**
|
||||
* The HTTP header containing the protobuf schema.
|
||||
*/
|
||||
public static final String X_PROTOBUF_SCHEMA_HEADER = "X-Protobuf-Schema";
|
||||
|
||||
/**
|
||||
* The HTTP header containing the protobuf message.
|
||||
*/
|
||||
public static final String X_PROTOBUF_MESSAGE_HEADER = "X-Protobuf-Message";
|
||||
|
||||
|
||||
@@ -243,6 +255,9 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Protobuf format support.
|
||||
*/
|
||||
interface ProtobufFormatSupport {
|
||||
|
||||
MediaType[] supportedMediaTypes();
|
||||
@@ -256,7 +271,10 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
throws IOException;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@link ProtobufFormatSupport} implementation used when
|
||||
* {@code com.googlecode.protobuf.format.FormatFactory} is available.
|
||||
*/
|
||||
static class ProtobufJavaFormatSupport implements ProtobufFormatSupport {
|
||||
|
||||
private final ProtobufFormatter jsonFormatter;
|
||||
@@ -317,6 +335,10 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@link ProtobufFormatSupport} implementation used when
|
||||
* {@code com.google.protobuf.util.JsonFormat} is available.
|
||||
*/
|
||||
static class ProtobufJavaUtilSupport implements ProtobufFormatSupport {
|
||||
|
||||
private final JsonFormat.Parser parser;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,7 +62,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
|
||||
/**
|
||||
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with the given
|
||||
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration, also
|
||||
* accepting an initializer that allows the registration of message extensions
|
||||
* accepting an initializer that allows the registration of message extensions.
|
||||
* @param parser the JSON parser configuration
|
||||
* @param printer the JSON printer configuration
|
||||
* @param registryInitializer an initializer for message extensions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import org.springframework.util.Assert;
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.0
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,6 +41,7 @@ import org.springframework.http.converter.HttpMessageConversionException;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public abstract class AbstractXmlHttpMessageConverter<T> extends AbstractHttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,6 +58,7 @@ import org.springframework.util.xml.StaxUtils;
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,6 +63,7 @@ import org.springframework.util.StreamUtils;
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.0
|
||||
* @param <T> the converted object type
|
||||
*/
|
||||
public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.springframework.util.Assert;
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of element signaled
|
||||
*/
|
||||
public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of element signaled to the {@link Subscriber}
|
||||
*/
|
||||
public abstract class AbstractListenerWriteFlushProcessor<T> implements Processor<Publisher<? extends T>, Void> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ import org.springframework.util.Assert;
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of element signaled to the {@link Subscriber}
|
||||
*/
|
||||
public abstract class AbstractListenerWriteProcessor<T> implements Processor<T, Void> {
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.util.Assert;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
* @param <T> the type of element signaled
|
||||
*/
|
||||
public class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||
|
||||
@@ -77,7 +78,7 @@ public class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||
|
||||
private enum State {
|
||||
|
||||
/** No emissions from the upstream source yet */
|
||||
/** No emissions from the upstream source yet. */
|
||||
NEW,
|
||||
|
||||
/**
|
||||
@@ -126,24 +127,24 @@ public class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||
@Nullable
|
||||
private Subscription subscription;
|
||||
|
||||
/** Cached data item before readyToWrite */
|
||||
/** Cached data item before readyToWrite. */
|
||||
@Nullable
|
||||
private T item;
|
||||
|
||||
/** Cached error signal before readyToWrite */
|
||||
/** Cached error signal before readyToWrite. */
|
||||
@Nullable
|
||||
private Throwable error;
|
||||
|
||||
/** Cached onComplete signal before readyToWrite */
|
||||
/** Cached onComplete signal before readyToWrite. */
|
||||
private boolean completed = false;
|
||||
|
||||
/** Recursive demand while emitting cached signals */
|
||||
/** Recursive demand while emitting cached signals. */
|
||||
private long demandBeforeReadyToWrite;
|
||||
|
||||
/** Current state */
|
||||
/** Current state. */
|
||||
private State state = State.NEW;
|
||||
|
||||
/** The actual writeSubscriber from the HTTP server adapter */
|
||||
/** The actual writeSubscriber from the HTTP server adapter. */
|
||||
@Nullable
|
||||
private Subscriber<? super T> writeSubscriber;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
/**
|
||||
* Represents a reactive server-side HTTP request
|
||||
* Represents a reactive server-side HTTP request.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -222,7 +222,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
|
||||
|
||||
/**
|
||||
* We cannot combine ERROR_LISTENER and HandlerResultSubscriber due to:
|
||||
* https://issues.jboss.org/browse/WFLY-8515
|
||||
* https://issues.jboss.org/browse/WFLY-8515.
|
||||
*/
|
||||
private static void runIfAsyncNotComplete(AsyncContext asyncContext, AtomicBoolean isCompleted, Runnable task) {
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.lang.Nullable;
|
||||
public interface SslInfo {
|
||||
|
||||
/**
|
||||
* Return the SSL session id, if any
|
||||
* Return the SSL session id, if any.
|
||||
*/
|
||||
@Nullable
|
||||
String getSessionId();
|
||||
|
||||
@@ -57,6 +57,9 @@ import org.springframework.util.CommonsLogWriter;
|
||||
*/
|
||||
public class HessianExporter extends RemoteExporter implements InitializingBean {
|
||||
|
||||
/**
|
||||
* The content type for hessian ({@code application/x-hessian}).
|
||||
*/
|
||||
public static final String CONTENT_TYPE_HESSIAN = "application/x-hessian";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@ import org.springframework.util.ClassUtils;
|
||||
public abstract class AbstractHttpInvokerRequestExecutor implements HttpInvokerRequestExecutor, BeanClassLoaderAware {
|
||||
|
||||
/**
|
||||
* Default content type: "application/x-java-serialized-object"
|
||||
* Default content type: "application/x-java-serialized-object".
|
||||
*/
|
||||
public static final String CONTENT_TYPE_SERIALIZED_OBJECT = "application/x-java-serialized-object";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,6 +44,9 @@ import javax.xml.ws.WebServiceProvider;
|
||||
*/
|
||||
public class SimpleJaxWsServiceExporter extends AbstractJaxWsServiceExporter {
|
||||
|
||||
/**
|
||||
* The default base address.
|
||||
*/
|
||||
public static final String DEFAULT_BASE_ADDRESS = "http://localhost:8080/";
|
||||
|
||||
private String baseAddress = DEFAULT_BASE_ADDRESS;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,12 +58,11 @@ import org.springframework.util.ReflectionUtils;
|
||||
* {@code web.xml} as follows:
|
||||
*
|
||||
* <pre class="code">
|
||||
* {@code
|
||||
* <absolute-ordering>
|
||||
* <name>some_web_fragment</name>
|
||||
* <name>spring_web</name>
|
||||
* </absolute-ordering>
|
||||
* }</pre>
|
||||
* <absolute-ordering>
|
||||
* <name>some_web_fragment</name>
|
||||
* <name>spring_web</name>
|
||||
* </absolute-ordering>
|
||||
* </pre>
|
||||
*
|
||||
* <h2>Relationship to Spring's {@code WebApplicationInitializer}</h2>
|
||||
* Spring's {@code WebApplicationInitializer} SPI consists of just one method:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,23 +35,22 @@ import javax.servlet.ServletException;
|
||||
* DispatcherServlet}. For reference, in WEB-INF/web.xml, this would typically be done as
|
||||
* follows:
|
||||
* <pre class="code">
|
||||
* {@code
|
||||
* <servlet>
|
||||
* <servlet-name>dispatcher</servlet-name>
|
||||
* <servlet-class>
|
||||
* <servlet>
|
||||
* <servlet-name>dispatcher</servlet-name>
|
||||
* <servlet-class>
|
||||
* org.springframework.web.servlet.DispatcherServlet
|
||||
* </servlet-class>
|
||||
* <init-param>
|
||||
* <param-name>contextConfigLocation</param-name>
|
||||
* <param-value>/WEB-INF/spring/dispatcher-config.xml</param-value>
|
||||
* </init-param>
|
||||
* <load-on-startup>1</load-on-startup>
|
||||
* </servlet>
|
||||
* </servlet-class>
|
||||
* <init-param>
|
||||
* <param-name>contextConfigLocation</param-name>
|
||||
* <param-value>/WEB-INF/spring/dispatcher-config.xml</param-value>
|
||||
* </init-param>
|
||||
* <load-on-startup>1</load-on-startup>
|
||||
* </servlet>
|
||||
*
|
||||
* <servlet-mapping>
|
||||
* <servlet-name>dispatcher</servlet-name>
|
||||
* <url-pattern>/</url-pattern>
|
||||
* </servlet-mapping>}</pre>
|
||||
* <servlet-mapping>
|
||||
* <servlet-name>dispatcher</servlet-name>
|
||||
* <url-pattern>/</url-pattern>
|
||||
* </servlet-mapping></pre>
|
||||
*
|
||||
* <h3>The code-based approach with {@code WebApplicationInitializer}</h3>
|
||||
* Here is the equivalent {@code DispatcherServlet} registration logic,
|
||||
|
||||
@@ -198,6 +198,8 @@ public class ContentNegotiationManagerFactoryBean
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether to use the Java Activation Framework as a fallback option
|
||||
* to map from file extensions to media types.
|
||||
* @deprecated as of 5.0, in favor of {@link #setUseRegisteredExtensionsOnly(boolean)}, which
|
||||
* has reverse behavior.
|
||||
*/
|
||||
@@ -261,8 +263,8 @@ public class ContentNegotiationManagerFactoryBean
|
||||
/**
|
||||
* Set the default content types to use when no content type is requested.
|
||||
* <p>By default this is not set.
|
||||
* @see #setDefaultContentTypeStrategy
|
||||
* @since 5.0
|
||||
* @see #setDefaultContentTypeStrategy
|
||||
*/
|
||||
public void setDefaultContentTypes(List<MediaType> contentTypes) {
|
||||
this.defaultNegotiationStrategy = new FixedContentNegotiationStrategy(contentTypes);
|
||||
@@ -272,8 +274,8 @@ public class ContentNegotiationManagerFactoryBean
|
||||
* Set a custom {@link ContentNegotiationStrategy} to use to determine
|
||||
* the content type to use when no content type is requested.
|
||||
* <p>By default this is not set.
|
||||
* @see #setDefaultContentType
|
||||
* @since 4.1.2
|
||||
* @see #setDefaultContentType
|
||||
*/
|
||||
public void setDefaultContentTypeStrategy(ContentNegotiationStrategy strategy) {
|
||||
this.defaultNegotiationStrategy = strategy;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -75,6 +75,8 @@ public class PathExtensionContentNegotiationStrategy extends AbstractMappingCont
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether to use the Java Activation Framework as a fallback option
|
||||
* to map from file extensions to media types.
|
||||
* @deprecated as of 5.0, in favor of {@link #setUseRegisteredExtensionsOnly(boolean)}.
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,14 +40,14 @@ import org.springframework.web.util.WebUtils;
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletRequestParameterPropertyValues extends MutablePropertyValues {
|
||||
|
||||
/** Default prefix separator */
|
||||
/** Default prefix separator. */
|
||||
public static final String DEFAULT_PREFIX_SEPARATOR = "_";
|
||||
|
||||
|
||||
/**
|
||||
* Create new ServletRequestPropertyValues using no prefix
|
||||
* (and hence, no prefix separator).
|
||||
* @param request HTTP request
|
||||
* @param request the HTTP request
|
||||
*/
|
||||
public ServletRequestParameterPropertyValues(ServletRequest request) {
|
||||
this(request, null, null);
|
||||
@@ -56,7 +56,7 @@ public class ServletRequestParameterPropertyValues extends MutablePropertyValues
|
||||
/**
|
||||
* Create new ServletRequestPropertyValues using the given prefix and
|
||||
* the default prefix separator (the underscore character "_").
|
||||
* @param request HTTP request
|
||||
* @param request the HTTP request
|
||||
* @param prefix the prefix for parameters (the full prefix will
|
||||
* consist of this plus the separator)
|
||||
* @see #DEFAULT_PREFIX_SEPARATOR
|
||||
@@ -68,7 +68,7 @@ public class ServletRequestParameterPropertyValues extends MutablePropertyValues
|
||||
/**
|
||||
* Create new ServletRequestPropertyValues supplying both prefix and
|
||||
* prefix separator.
|
||||
* @param request HTTP request
|
||||
* @param request the HTTP request
|
||||
* @param prefix the prefix for parameters (the full prefix will
|
||||
* consist of this plus the separator)
|
||||
* @param prefixSeparator separator delimiting prefix (e.g. "spring")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -98,8 +98,8 @@ public class UnsatisfiedServletRequestParameterException extends ServletRequestB
|
||||
|
||||
/**
|
||||
* Return all parameter condition groups that have been violated.
|
||||
* @see org.springframework.web.bind.annotation.RequestMapping#params()
|
||||
* @since 4.2
|
||||
* @see org.springframework.web.bind.annotation.RequestMapping#params()
|
||||
*/
|
||||
public final List<String[]> getParamConditionGroups() {
|
||||
return this.paramConditions;
|
||||
|
||||
@@ -309,7 +309,7 @@ public class WebDataBinder extends DataBinder {
|
||||
* (in case of a multipart request). To be called by subclasses.
|
||||
* <p>Multipart files will only be added to the property values if they
|
||||
* are not empty or if we're configured to bind empty multipart files too.
|
||||
* @param multipartFiles Map of field name String to MultipartFile object
|
||||
* @param multipartFiles a Map of field name String to MultipartFile object
|
||||
* @param mpvs the property values to be bound (can be modified)
|
||||
* @see org.springframework.web.multipart.MultipartFile
|
||||
* @see #setBindEmptyMultipartFiles
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ import org.springframework.web.multipart.MultipartResolver;
|
||||
* method argument types. The main difference is that when the method argument is not a
|
||||
* String, @{@link RequestParam} relies on type conversion via a registered
|
||||
* {@link Converter} or {@link PropertyEditor} while @{@link RequestPart} relies
|
||||
* on {@link HttpMessageConverter}s taking into consideration the 'Content-Type' header
|
||||
* on {@link HttpMessageConverter HttpMessageConverters} taking into consideration the 'Content-Type' header
|
||||
* of the request part. @{@link RequestParam} is likely to be used with name-value form
|
||||
* fields while @{@link RequestPart} is likely to be used with parts containing more
|
||||
* complex content (e.g. JSON, XML).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -613,7 +613,7 @@ public class AsyncRestTemplate extends org.springframework.http.client.support.I
|
||||
|
||||
/**
|
||||
* Future returned from
|
||||
* {@link #doExecute(URI, HttpMethod, AsyncRequestCallback, ResponseExtractor)}
|
||||
* {@link #doExecute(URI, HttpMethod, AsyncRequestCallback, ResponseExtractor)}.
|
||||
*/
|
||||
private class ResponseExtractorFuture<T> extends ListenableFutureAdapter<T, ClientHttpResponse> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
* Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter}s to
|
||||
* Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter ResponseErrorHandler} that uses {@link HttpMessageConverters} to
|
||||
* convert HTTP error responses to {@link RestClientException}.
|
||||
*
|
||||
* <p>To use this error handler, you must specify a
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
* @param <T> the data type
|
||||
* @see RestTemplate
|
||||
*/
|
||||
public class HttpMessageConverterExtractor<T> implements ResponseExtractor<T> {
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
* @param <T> the data type
|
||||
* @see RestTemplate#execute
|
||||
*/
|
||||
@FunctionalInterface
|
||||
|
||||
@@ -172,7 +172,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
|
||||
/**
|
||||
* Create a new instance of the {@link RestTemplate} using default settings.
|
||||
* Default {@link HttpMessageConverter}s are initialized.
|
||||
* Default {@link HttpMessageConverter HttpMessageConverters} are initialized.
|
||||
*/
|
||||
public RestTemplate() {
|
||||
this.messageConverters.add(new ByteArrayHttpMessageConverter());
|
||||
@@ -213,7 +213,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
|
||||
/**
|
||||
* Create a new instance of the {@link RestTemplate} based on the given {@link ClientHttpRequestFactory}.
|
||||
* @param requestFactory HTTP request factory to use
|
||||
* @param requestFactory the HTTP request factory to use
|
||||
* @see org.springframework.http.client.SimpleClientHttpRequestFactory
|
||||
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
|
||||
*/
|
||||
@@ -224,8 +224,8 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
|
||||
/**
|
||||
* Create a new instance of the {@link RestTemplate} using the given list of
|
||||
* {@link HttpMessageConverter} to use
|
||||
* @param messageConverters the list of {@link HttpMessageConverter} to use
|
||||
* {@link HttpMessageConverter} to use.
|
||||
* @param messageConverters the list of {@link HttpMessageConverter} to use.
|
||||
* @since 3.2.7
|
||||
*/
|
||||
public RestTemplate(List<HttpMessageConverter<?>> messageConverters) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,7 +35,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
*/
|
||||
public class RestGatewaySupport {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,7 @@ import org.springframework.web.WebApplicationInitializer;
|
||||
*/
|
||||
public abstract class AbstractContextLoaderInitializer implements WebApplicationInitializer {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -87,7 +87,7 @@ public class ContextLoader {
|
||||
|
||||
/**
|
||||
* Config param for the root WebApplicationContext id,
|
||||
* to be used as serialization id for the underlying BeanFactory: {@value}
|
||||
* to be used as serialization id for the underlying BeanFactory: {@value}.
|
||||
*/
|
||||
public static final String CONTEXT_ID_PARAM = "contextId";
|
||||
|
||||
@@ -100,21 +100,21 @@ public class ContextLoader {
|
||||
public static final String CONFIG_LOCATION_PARAM = "contextConfigLocation";
|
||||
|
||||
/**
|
||||
* Config param for the root WebApplicationContext implementation class to use: {@value}
|
||||
* Config param for the root WebApplicationContext implementation class to use: {@value}.
|
||||
* @see #determineContextClass(ServletContext)
|
||||
*/
|
||||
public static final String CONTEXT_CLASS_PARAM = "contextClass";
|
||||
|
||||
/**
|
||||
* Config param for {@link ApplicationContextInitializer} classes to use
|
||||
* for initializing the root web application context: {@value}
|
||||
* for initializing the root web application context: {@value}.
|
||||
* @see #customizeContext(ServletContext, ConfigurableWebApplicationContext)
|
||||
*/
|
||||
public static final String CONTEXT_INITIALIZER_CLASSES_PARAM = "contextInitializerClasses";
|
||||
|
||||
/**
|
||||
* Config param for global {@link ApplicationContextInitializer} classes to use
|
||||
* for initializing all web application contexts in the current application: {@value}
|
||||
* for initializing all web application contexts in the current application: {@value}.
|
||||
* @see #customizeContext(ServletContext, ConfigurableWebApplicationContext)
|
||||
*/
|
||||
public static final String GLOBAL_INITIALIZER_CLASSES_PARAM = "globalInitializerClasses";
|
||||
@@ -168,7 +168,7 @@ public class ContextLoader {
|
||||
@Nullable
|
||||
private WebApplicationContext context;
|
||||
|
||||
/** Actual ApplicationContextInitializer instances to apply to the context */
|
||||
/** Actual ApplicationContextInitializer instances to apply to the context. */
|
||||
private final List<ApplicationContextInitializer<ConfigurableApplicationContext>> contextInitializers =
|
||||
new ArrayList<>();
|
||||
|
||||
@@ -206,7 +206,7 @@ public class ContextLoader {
|
||||
* <li>{@code ServletContext} and {@code ServletConfig} objects will be delegated to
|
||||
* the application context</li>
|
||||
* <li>{@link #customizeContext} will be called</li>
|
||||
* <li>Any {@link ApplicationContextInitializer}s specified through the
|
||||
* <li>Any {@link ApplicationContextInitializer ApplicationContextInitializers} specified through the
|
||||
* "contextInitializerClasses" init-param will be applied.</li>
|
||||
* <li>{@link ConfigurableApplicationContext#refresh refresh()} will be called</li>
|
||||
* </ul>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -72,7 +72,7 @@ public class ContextLoaderListener extends ContextLoader implements ServletConte
|
||||
* <li>{@code ServletContext} and {@code ServletConfig} objects will be delegated to
|
||||
* the application context</li>
|
||||
* <li>{@link #customizeContext} will be called</li>
|
||||
* <li>Any {@link org.springframework.context.ApplicationContextInitializer ApplicationContextInitializer}s
|
||||
* <li>Any {@link org.springframework.context.ApplicationContextInitializer ApplicationContextInitializer org.springframework.context.ApplicationContextInitializer ApplicationContextInitializers}
|
||||
* specified through the "contextInitializerClasses" init-param will be applied.</li>
|
||||
* <li>{@link org.springframework.context.ConfigurableApplicationContext#refresh refresh()} will be called</li>
|
||||
* </ul>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,7 @@ public interface ServletConfigAware extends Aware {
|
||||
* callback like InitializingBean's {@code afterPropertiesSet} or a
|
||||
* custom init-method. Invoked after ApplicationContextAware's
|
||||
* {@code setApplicationContext}.
|
||||
* @param servletConfig ServletConfig object to be used by this object
|
||||
* @param servletConfig the {@link ServletConfig} to be used by this object
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,7 +38,7 @@ public interface ServletContextAware extends Aware {
|
||||
* callback like InitializingBean's {@code afterPropertiesSet} or a
|
||||
* custom init-method. Invoked after ApplicationContextAware's
|
||||
* {@code setApplicationContext}.
|
||||
* @param servletContext ServletContext object to be used by this object
|
||||
* @param servletContext the ServletContext object to be used by this object
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class AbstractRequestAttributes implements RequestAttributes {
|
||||
|
||||
/** Map from attribute name String to destruction callback Runnable */
|
||||
/** Map from attribute name String to destruction callback Runnable. */
|
||||
protected final Map<String, Runnable> requestDestructionCallbacks = new LinkedHashMap<>(8);
|
||||
|
||||
private volatile boolean requestActive = true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -85,7 +85,7 @@ public class FacesRequestAttributes implements RequestAttributes {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the JSF attribute Map for the specified scope
|
||||
* Return the JSF attribute Map for the specified scope.
|
||||
* @param scope constant indicating request or session scope
|
||||
* @return the Map representation of the attributes in the specified scope
|
||||
* @see #SCOPE_REQUEST
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,13 +63,13 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ
|
||||
private static final List<String> SAFE_METHODS = Arrays.asList("GET", "HEAD");
|
||||
|
||||
/**
|
||||
* Pattern matching ETag multiple field values in headers such as "If-Match", "If-None-Match"
|
||||
* Pattern matching ETag multiple field values in headers such as "If-Match", "If-None-Match".
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7232#section-2.3">Section 2.3 of RFC 7232</a>
|
||||
*/
|
||||
private static final Pattern ETAG_HEADER_VALUE_PATTERN = Pattern.compile("\\*|\\s*((W\\/)?(\"[^\"]*\"))\\s*,?");
|
||||
|
||||
/**
|
||||
* Date formats as specified in the HTTP RFC
|
||||
* Date formats as specified in the HTTP RFC.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7231#section-7.1.1.1">Section 7.1.1.1 of RFC 7231</a>
|
||||
*/
|
||||
private static final String[] DATE_FORMATS = new String[] {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,8 +80,8 @@ public interface WebRequest extends RequestAttributes {
|
||||
|
||||
/**
|
||||
* Return a Iterator over request parameter names.
|
||||
* @see javax.servlet.http.HttpServletRequest#getParameterNames()
|
||||
* @since 3.0
|
||||
* @see javax.servlet.http.HttpServletRequest#getParameterNames()
|
||||
*/
|
||||
Iterator<String> getParameterNames();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,6 +48,7 @@ import org.springframework.web.context.request.NativeWebRequest;
|
||||
* @author Juergen Hoeller
|
||||
* @author Rob Winch
|
||||
* @since 3.2
|
||||
* @param <T> the result type
|
||||
*/
|
||||
public class DeferredResult<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,7 +83,8 @@ class DeferredResultInterceptorChain {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true to continue error handling, or false to bypass any further
|
||||
* Determine if further error handling should be bypassed.
|
||||
* @return {@code true} to continue error handling, or false to bypass any further
|
||||
* error handling
|
||||
*/
|
||||
public boolean triggerAfterError(NativeWebRequest request, DeferredResult<?> deferredResult, Throwable ex)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ import org.springframework.web.context.request.ServletWebRequest;
|
||||
*
|
||||
* <p>The servlet and all filters involved in an async request must have async
|
||||
* support enabled using the Servlet API or by adding an
|
||||
* {@code <async-supported>true</async-supported>} element to servlet and filter
|
||||
* <code><async-supported>true</async-supported></code> element to servlet and filter
|
||||
* declarations in {@code web.xml}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -211,7 +211,7 @@ public final class WebAsyncManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register one or more {@link DeferredResultProcessingInterceptor}s without a specified key.
|
||||
* Register one or more {@link DeferredResultProcessingInterceptor DeferredResultProcessingInterceptors} without a specified key.
|
||||
* The default key is derived from the interceptor class name and hash code.
|
||||
* @param interceptors one or more interceptors to register
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.web.context.request.NativeWebRequest;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.2
|
||||
* @param <V> the value type
|
||||
*/
|
||||
public class WebAsyncTask<V> implements BeanFactoryAware {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,6 +32,9 @@ import org.springframework.web.context.request.WebRequest;
|
||||
*/
|
||||
public abstract class WebAsyncUtils {
|
||||
|
||||
/**
|
||||
* The name attribute containing the {@link WebAsyncManager}.
|
||||
*/
|
||||
public static final String WEB_ASYNC_MANAGER_ATTRIBUTE =
|
||||
WebAsyncManager.class.getName() + ".WEB_ASYNC_MANAGER";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -81,19 +81,19 @@ import org.springframework.web.context.ServletContextAware;
|
||||
public abstract class AbstractRefreshableWebApplicationContext extends AbstractRefreshableConfigApplicationContext
|
||||
implements ConfigurableWebApplicationContext, ThemeSource {
|
||||
|
||||
/** Servlet context that this context runs in */
|
||||
/** Servlet context that this context runs in. */
|
||||
@Nullable
|
||||
private ServletContext servletContext;
|
||||
|
||||
/** Servlet config that this context runs in, if any */
|
||||
/** Servlet config that this context runs in, if any. */
|
||||
@Nullable
|
||||
private ServletConfig servletConfig;
|
||||
|
||||
/** Namespace of this context, or {@code null} if root */
|
||||
/** Namespace of this context, or {@code null} if root. */
|
||||
@Nullable
|
||||
private String namespace;
|
||||
|
||||
/** the ThemeSource for this ApplicationContext */
|
||||
/** the ThemeSource for this ApplicationContext. */
|
||||
@Nullable
|
||||
private ThemeSource themeSource;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,7 +43,7 @@ import org.springframework.web.context.ServletContextAware;
|
||||
* {@link org.springframework.web.context.ConfigurableWebApplicationContext},
|
||||
* but is not intended for declarative setup in {@code web.xml}. Instead,
|
||||
* it is designed for programmatic setup, for example for building nested contexts or
|
||||
* for use within Spring 3.1 {@link org.springframework.web.WebApplicationInitializer}s.
|
||||
* for use within Spring 3.1 {@link org.springframework.web.WebApplicationInitializer org.springframework.web.WebApplicationInitializers}.
|
||||
*
|
||||
* <p><b>If you intend to implement a WebApplicationContext that reads bean definitions
|
||||
* from configuration files, consider deriving from AbstractRefreshableWebApplicationContext,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -69,13 +69,13 @@ import org.springframework.lang.Nullable;
|
||||
*/
|
||||
public class GroovyWebApplicationContext extends AbstractRefreshableWebApplicationContext implements GroovyObject {
|
||||
|
||||
/** Default config location for the root context */
|
||||
/** Default config location for the root context. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION = "/WEB-INF/applicationContext.groovy";
|
||||
|
||||
/** Default prefix for building a config location for a namespace */
|
||||
/** Default prefix for building a config location for a namespace. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION_PREFIX = "/WEB-INF/";
|
||||
|
||||
/** Default suffix for building a config location for a namespace */
|
||||
/** Default suffix for building a config location for a namespace. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION_SUFFIX = ".groovy";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,18 +37,18 @@ import org.springframework.lang.Nullable;
|
||||
@SuppressWarnings("serial")
|
||||
public class RequestHandledEvent extends ApplicationEvent {
|
||||
|
||||
/** Session id that applied to the request, if any */
|
||||
/** Session id that applied to the request, if any. */
|
||||
@Nullable
|
||||
private String sessionId;
|
||||
|
||||
/** Usually the UserPrincipal */
|
||||
/** Usually the UserPrincipal. */
|
||||
@Nullable
|
||||
private String userName;
|
||||
|
||||
/** Request processing time */
|
||||
/** Request processing time. */
|
||||
private final long processingTimeMillis;
|
||||
|
||||
/** Cause of failure, if any */
|
||||
/** Cause of failure, if any. */
|
||||
@Nullable
|
||||
private Throwable failureCause;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,19 +30,19 @@ import org.springframework.lang.Nullable;
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletRequestHandledEvent extends RequestHandledEvent {
|
||||
|
||||
/** URL that triggered the request */
|
||||
/** URL that triggered the request. */
|
||||
private final String requestUrl;
|
||||
|
||||
/** IP address that the request came from */
|
||||
/** IP address that the request came from. */
|
||||
private final String clientAddress;
|
||||
|
||||
/** Usually GET or POST */
|
||||
/** Usually GET or POST. */
|
||||
private final String method;
|
||||
|
||||
/** Name of the servlet that handled the request */
|
||||
/** Name of the servlet that handled the request. */
|
||||
private final String servletName;
|
||||
|
||||
/** HTTP status code of the response */
|
||||
/** HTTP status code of the response. */
|
||||
private final int statusCode;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,13 +44,13 @@ import org.springframework.web.context.ConfigurableWebEnvironment;
|
||||
*/
|
||||
public class StandardServletEnvironment extends StandardEnvironment implements ConfigurableWebEnvironment {
|
||||
|
||||
/** Servlet context init parameters property source name: {@value} */
|
||||
/** Servlet context init parameters property source name: {@value}. */
|
||||
public static final String SERVLET_CONTEXT_PROPERTY_SOURCE_NAME = "servletContextInitParams";
|
||||
|
||||
/** Servlet config init parameters property source name: {@value} */
|
||||
/** Servlet config init parameters property source name: {@value}. */
|
||||
public static final String SERVLET_CONFIG_PROPERTY_SOURCE_NAME = "servletConfigInitParams";
|
||||
|
||||
/** JNDI property source name: {@value} */
|
||||
/** JNDI property source name: {@value}. */
|
||||
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,7 +73,7 @@ public abstract class WebApplicationContextUtils {
|
||||
* loaded via {@link org.springframework.web.context.ContextLoaderListener}.
|
||||
* <p>Will rethrow an exception that happened on root context startup,
|
||||
* to differentiate between a failed context startup and no context at all.
|
||||
* @param sc ServletContext to find the web application context for
|
||||
* @param sc the ServletContext to find the web application context for
|
||||
* @return the root WebApplicationContext for this web app
|
||||
* @throws IllegalStateException if the root WebApplicationContext could not be found
|
||||
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
|
||||
@@ -91,7 +91,7 @@ public abstract class WebApplicationContextUtils {
|
||||
* loaded via {@link org.springframework.web.context.ContextLoaderListener}.
|
||||
* <p>Will rethrow an exception that happened on root context startup,
|
||||
* to differentiate between a failed context startup and no context at all.
|
||||
* @param sc ServletContext to find the web application context for
|
||||
* @param sc the ServletContext to find the web application context for
|
||||
* @return the root WebApplicationContext for this web app, or {@code null} if none
|
||||
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ public abstract class WebApplicationContextUtils {
|
||||
|
||||
/**
|
||||
* Find a custom {@code WebApplicationContext} for this web app.
|
||||
* @param sc ServletContext to find the web application context for
|
||||
* @param sc the ServletContext to find the web application context for
|
||||
* @param attrName the name of the ServletContext attribute to look for
|
||||
* @return the desired WebApplicationContext for this web app, or {@code null} if none
|
||||
*/
|
||||
@@ -137,7 +137,7 @@ public abstract class WebApplicationContextUtils {
|
||||
* controlled through its {@code publishContext} property, which is {@code true}
|
||||
* by default but can be selectively switched to only publish a single context
|
||||
* despite multiple {@code DispatcherServlet} registrations in the web app.
|
||||
* @param sc ServletContext to find the web application context for
|
||||
* @param sc the ServletContext to find the web application context for
|
||||
* @return the desired WebApplicationContext for this web app, or {@code null} if none
|
||||
* @since 4.2
|
||||
* @see #getWebApplicationContext(ServletContext)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -61,13 +61,13 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
*/
|
||||
public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationContext {
|
||||
|
||||
/** Default config location for the root context */
|
||||
/** Default config location for the root context. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION = "/WEB-INF/applicationContext.xml";
|
||||
|
||||
/** Default prefix for building a config location for a namespace */
|
||||
/** Default prefix for building a config location for a namespace. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION_PREFIX = "/WEB-INF/";
|
||||
|
||||
/** Default suffix for building a config location for a namespace */
|
||||
/** Default suffix for building a config location for a namespace. */
|
||||
public static final String DEFAULT_CONFIG_LOCATION_SUFFIX = ".xml";
|
||||
|
||||
|
||||
|
||||
@@ -60,12 +60,28 @@ import org.springframework.web.util.WebUtils;
|
||||
*/
|
||||
public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter {
|
||||
|
||||
/**
|
||||
* The default value prepended to the log message written <i>before</i> a request is
|
||||
* processed.
|
||||
*/
|
||||
public static final String DEFAULT_BEFORE_MESSAGE_PREFIX = "Before request [";
|
||||
|
||||
/**
|
||||
* The default value appended to the log message written <i>before</i> a request is
|
||||
* processed.
|
||||
*/
|
||||
public static final String DEFAULT_BEFORE_MESSAGE_SUFFIX = "]";
|
||||
|
||||
/**
|
||||
* The default value prepended to the log message written <i>after</i> a request is
|
||||
* processed.
|
||||
*/
|
||||
public static final String DEFAULT_AFTER_MESSAGE_PREFIX = "After request [";
|
||||
|
||||
/**
|
||||
* The default value appended to the log message written <i>after</i> a request is
|
||||
* processed.
|
||||
*/
|
||||
public static final String DEFAULT_AFTER_MESSAGE_SUFFIX = "]";
|
||||
|
||||
private static final int DEFAULT_MAX_PAYLOAD_LENGTH = 50;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -155,7 +155,7 @@ public class CharacterEncodingFilter extends OncePerRequestFilter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the encoding should be forced on requests
|
||||
* Return whether the encoding should be forced on requests.
|
||||
* @since 4.3
|
||||
*/
|
||||
public boolean isForceRequestEncoding() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -81,7 +81,7 @@ import org.springframework.web.util.NestedServletException;
|
||||
public abstract class GenericFilterBean implements Filter, BeanNameAware, EnvironmentAware,
|
||||
EnvironmentCapable, ServletContextAware, InitializingBean, DisposableBean {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
@@ -330,7 +330,7 @@ public abstract class GenericFilterBean implements Filter, BeanNameAware, Enviro
|
||||
|
||||
/**
|
||||
* Create new FilterConfigPropertyValues.
|
||||
* @param config FilterConfig we'll use to take PropertyValues from
|
||||
* @param config the FilterConfig we'll use to take PropertyValues from
|
||||
* @param requiredProperties set of property names we need, where
|
||||
* we can't accept default values
|
||||
* @throws ServletException if any required properties are missing
|
||||
|
||||
@@ -59,7 +59,7 @@ public class HiddenHttpMethodFilter extends OncePerRequestFilter {
|
||||
Collections.unmodifiableList(Arrays.asList(HttpMethod.PUT.name(),
|
||||
HttpMethod.DELETE.name(), HttpMethod.PATCH.name()));
|
||||
|
||||
/** Default method parameter: {@code _method} */
|
||||
/** Default method parameter: {@code _method}. */
|
||||
public static final String DEFAULT_METHOD_PARAM = "_method";
|
||||
|
||||
private String methodParam = DEFAULT_METHOD_PARAM;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class HiddenHttpMethodFilter implements WebFilter {
|
||||
Collections.unmodifiableList(Arrays.asList(HttpMethod.PUT,
|
||||
HttpMethod.DELETE, HttpMethod.PATCH));
|
||||
|
||||
/** Default name of the form parameter with the HTTP method to use */
|
||||
/** Default name of the form parameter with the HTTP method to use. */
|
||||
public static final String DEFAULT_METHOD_PARAMETER_NAME = "_method";
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ public class HiddenHttpMethodFilter implements WebFilter {
|
||||
|
||||
|
||||
/**
|
||||
* Transform an HTTP POST into another method based on {@code methodParamName}
|
||||
*
|
||||
* Transform an HTTP POST into another method based on {@code methodParamName}.
|
||||
* @param exchange the current server exchange
|
||||
* @param chain provides a way to delegate to the next filter
|
||||
* @return {@code Mono<Void>} to indicate when request processing is complete
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -75,7 +75,7 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
|
||||
|
||||
/**
|
||||
* Default name of the target bean in the Spring application context:
|
||||
* "jsfNavigationHandler"
|
||||
* "jsfNavigationHandler".
|
||||
*/
|
||||
public static final String DEFAULT_TARGET_BEAN_NAME = "jsfNavigationHandler";
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
|
||||
public static final String WEB_APPLICATION_CONTEXT_VARIABLE_NAME = "webApplicationContext";
|
||||
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
|
||||
@@ -149,8 +149,8 @@ public class ControllerAdviceBean implements Ordered {
|
||||
* Check whether the given bean type should be assisted by this
|
||||
* {@code @ControllerAdvice} instance.
|
||||
* @param beanType the type of the bean to check
|
||||
* @see org.springframework.web.bind.annotation.ControllerAdvice
|
||||
* @since 4.0
|
||||
* @see org.springframework.web.bind.annotation.ControllerAdvice
|
||||
*/
|
||||
public boolean isApplicableToBeanType(@Nullable Class<?> beanType) {
|
||||
return this.beanTypePredicate.test(beanType);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,7 +53,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
*/
|
||||
public class HandlerMethod {
|
||||
|
||||
/** Logger that is available to subclasses */
|
||||
/** Logger that is available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private final Object bean;
|
||||
|
||||
@@ -147,6 +147,9 @@ public class HandlerTypePredicate implements Predicate<Class<?>> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A {@link HandlerTypePredicate} builder.
|
||||
*/
|
||||
public static class Builder {
|
||||
|
||||
private final Set<String> basePackages = new LinkedHashSet<>();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user