mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Polish @since tags
Closes gh-47779
This commit is contained in:
+2
-5
@@ -105,12 +105,12 @@ public interface BootstrapRegistry {
|
||||
* bootstrap instances.
|
||||
* @return the instance or {@code null}
|
||||
*/
|
||||
@Nullable T get(BootstrapContext context);
|
||||
@Nullable
|
||||
T get(BootstrapContext context);
|
||||
|
||||
/**
|
||||
* Return the scope of the supplied instance.
|
||||
* @return the scope
|
||||
* @since 2.4.2
|
||||
*/
|
||||
default Scope getScope() {
|
||||
return Scope.SINGLETON;
|
||||
@@ -120,7 +120,6 @@ public interface BootstrapRegistry {
|
||||
* Return a new {@link InstanceSupplier} with an updated {@link Scope}.
|
||||
* @param scope the new scope
|
||||
* @return a new {@link InstanceSupplier} instance with the new scope
|
||||
* @since 2.4.2
|
||||
*/
|
||||
default InstanceSupplier<T> withScope(Scope scope) {
|
||||
Assert.notNull(scope, "'scope' must not be null");
|
||||
@@ -166,8 +165,6 @@ public interface BootstrapRegistry {
|
||||
|
||||
/**
|
||||
* The scope of an instance.
|
||||
*
|
||||
* @since 2.4.2
|
||||
*/
|
||||
enum Scope {
|
||||
|
||||
|
||||
+4
-5
@@ -383,7 +383,8 @@ public final class PropertyMapper {
|
||||
* @param value the value to adapt
|
||||
* @return an adapted value or {@code null}
|
||||
*/
|
||||
@Nullable R adapt(T value);
|
||||
@Nullable
|
||||
R adapt(T value);
|
||||
|
||||
}
|
||||
|
||||
@@ -502,7 +503,6 @@ public final class PropertyMapper {
|
||||
*
|
||||
* @param <T> the source type
|
||||
* @param <R> the result type
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Adapter<T, R> {
|
||||
@@ -512,7 +512,8 @@ public final class PropertyMapper {
|
||||
* @param value the value to adapt
|
||||
* @return an adapted value or {@code null}
|
||||
*/
|
||||
@Nullable R adapt(@Nullable T value);
|
||||
@Nullable
|
||||
R adapt(@Nullable T value);
|
||||
|
||||
}
|
||||
|
||||
@@ -521,7 +522,6 @@ public final class PropertyMapper {
|
||||
*
|
||||
* @param <T> the source type
|
||||
* @param <R> the result type
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Factory<T, R extends @Nullable Object> {
|
||||
@@ -541,7 +541,6 @@ public final class PropertyMapper {
|
||||
*
|
||||
* @param <T> the source type
|
||||
* @param <R> the result type
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Mapper<R extends @Nullable Object, T> {
|
||||
|
||||
-1
@@ -81,7 +81,6 @@ public interface EnvironmentPostProcessorsFactory {
|
||||
* @param classLoader the source class loader
|
||||
* @param classNames the post processor class names
|
||||
* @return an {@link EnvironmentPostProcessorsFactory} instance
|
||||
* @since 2.4.8
|
||||
*/
|
||||
static EnvironmentPostProcessorsFactory of(@Nullable ClassLoader classLoader, String... classNames) {
|
||||
return new ReflectionEnvironmentPostProcessorsFactory(classLoader, classNames);
|
||||
|
||||
+2
-2
@@ -197,7 +197,6 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry, Ordered {
|
||||
* description based on the request {@code servletPath} and {@code pathInfo}.
|
||||
* @param request the source request
|
||||
* @return the description
|
||||
* @since 1.5.0
|
||||
*/
|
||||
protected String getDescription(HttpServletRequest request) {
|
||||
String pathInfo = (request.getPathInfo() != null) ? request.getPathInfo() : "";
|
||||
@@ -356,7 +355,8 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry, Ordered {
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable String getMessage() {
|
||||
@Nullable
|
||||
String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -190,7 +190,6 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
|
||||
* the {@link SpringApplication}. The default implementation returns a new
|
||||
* {@code SpringApplicationBuilder} in its default state.
|
||||
* @return the {@code SpringApplicationBuilder}.
|
||||
* @since 1.3.0
|
||||
*/
|
||||
protected SpringApplicationBuilder createSpringApplicationBuilder() {
|
||||
return new SpringApplicationBuilder();
|
||||
|
||||
+2
-2
@@ -166,7 +166,6 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter {
|
||||
* @param location the location of the index file
|
||||
* @param lines the lines to write
|
||||
* @throws IOException if the write fails
|
||||
* @since 2.3.0
|
||||
*/
|
||||
public void writeIndexFile(@Nullable String location, Collection<String> lines) throws IOException {
|
||||
if (location != null) {
|
||||
@@ -363,7 +362,8 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter {
|
||||
*/
|
||||
EntryTransformer NONE = (jarEntry) -> jarEntry;
|
||||
|
||||
@Nullable JarArchiveEntry transform(JarArchiveEntry jarEntry);
|
||||
@Nullable
|
||||
JarArchiveEntry transform(JarArchiveEntry jarEntry);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -51,7 +51,6 @@ public @interface ManagementContextConfiguration {
|
||||
* Specifies the type of management context that is required for this configuration to
|
||||
* be applied.
|
||||
* @return the required management context type
|
||||
* @since 2.0.0
|
||||
*/
|
||||
ManagementContextType value() default ManagementContextType.ANY;
|
||||
|
||||
@@ -75,7 +74,7 @@ public @interface ManagementContextConfiguration {
|
||||
* "@Bean Lite Mode" (see {@link Bean @Bean's javadoc}). It is therefore behaviorally
|
||||
* equivalent to removing the {@code @Configuration} stereotype.
|
||||
* @return whether to proxy {@code @Bean} methods
|
||||
* @since 2.2
|
||||
* @since 2.2.0
|
||||
*/
|
||||
@AliasFor(annotation = Configuration.class)
|
||||
boolean proxyBeanMethods() default true;
|
||||
|
||||
-1
@@ -66,7 +66,6 @@ public @interface DataCassandraTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ public @interface DataJpaTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -69,7 +69,6 @@ public @interface DataLdapTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -67,7 +67,6 @@ public @interface DataMongoTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -74,7 +74,6 @@ public @interface DataNeo4jTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -66,7 +66,6 @@ public @interface DataRedisTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.springframework.util.unit.DataSize;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Andy Wilkinson
|
||||
* @since 3.5.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.http.codecs")
|
||||
public class HttpCodecsProperties {
|
||||
|
||||
-1
@@ -185,7 +185,6 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
* {@link AllEncompassingFormHttpMessageConverter}.
|
||||
* @param converters a mutable list of the converters that will be used.
|
||||
* @return the final converts list to use
|
||||
* @since 1.3.0
|
||||
*/
|
||||
protected List<HttpMessageConverter<?>> postProcessPartConverters(List<HttpMessageConverter<?>> converters) {
|
||||
return converters;
|
||||
|
||||
-1
@@ -74,7 +74,6 @@ public abstract class ObjectValueDeserializer<T> extends ValueDeserializer<T> {
|
||||
* @param <R> the result type
|
||||
* @param mapper a mapper to convert the value when it is not {@code null}
|
||||
* @return the node value or {@code null}
|
||||
* @since 3.4.0
|
||||
*/
|
||||
protected final <D, R> @Nullable R nullSafeValue(@Nullable JsonNode jsonNode, Class<D> type,
|
||||
Function<D, R> mapper) {
|
||||
|
||||
-1
@@ -89,7 +89,6 @@ public abstract class JsonObjectDeserializer<T> extends com.fasterxml.jackson.da
|
||||
* @param <R> the result type
|
||||
* @param mapper a mapper to convert the value when it is not {@code null}
|
||||
* @return the node value or {@code null}
|
||||
* @since 3.4.0
|
||||
*/
|
||||
protected final <D, R> @Nullable R nullSafeValue(JsonNode jsonNode, Class<D> type, Function<D, R> mapper) {
|
||||
D value = nullSafeValue(jsonNode, type);
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.boot.jackson.ObjectValueSerializer;
|
||||
*
|
||||
* @param <T> the supported object type
|
||||
* @author Phillip Webb
|
||||
* @since 1.4.0
|
||||
* @since 4.0.0
|
||||
* @see JsonObjectDeserializer
|
||||
* @deprecated since 4.0.0 for removal in 4.2.0 in favor of Jackson 3 and
|
||||
* {@link ObjectValueSerializer}
|
||||
|
||||
+1
-2
@@ -60,7 +60,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Artsiom Yudovin
|
||||
* @since 1.5.0
|
||||
* @since 4.0.0
|
||||
* @see AutoConfigureJdbc
|
||||
* @see AutoConfigureTestDatabase
|
||||
*/
|
||||
@@ -82,7 +82,6 @@ public @interface JdbcTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -66,7 +66,6 @@ public interface ConfigurableJettyWebServerFactory extends ConfigurableWebServer
|
||||
/**
|
||||
* Sets the maximum number of concurrent connections.
|
||||
* @param maxConnections the maximum number of concurrent connections
|
||||
* @since 4.0.0
|
||||
*/
|
||||
void setMaxConnections(int maxConnections);
|
||||
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ public final class ConnectionFactoryUnwrapper {
|
||||
* @param connectionFactory a connection factory
|
||||
* @return the native connection factory that a {@link CachingConnectionFactory}
|
||||
* wraps, if any
|
||||
* @since 3.4.1
|
||||
*/
|
||||
public static ConnectionFactory unwrapCaching(ConnectionFactory connectionFactory) {
|
||||
if (connectionFactory instanceof CachingConnectionFactory cachingConnectionFactory) {
|
||||
|
||||
-1
@@ -74,7 +74,6 @@ public @interface JooqTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
+2
-6
@@ -73,7 +73,6 @@ public class EntityManagerFactoryBuilder {
|
||||
* provider, based on the {@linkplain #dataSource(DataSource) configured data source}
|
||||
* @param persistenceUnitManager optional source of persistence unit information (can
|
||||
* be null)
|
||||
* @since 3.4.4
|
||||
*/
|
||||
public EntityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter,
|
||||
Function<DataSource, Map<String, ?>> jpaPropertiesFactory,
|
||||
@@ -91,7 +90,6 @@ public class EntityManagerFactoryBuilder {
|
||||
* be null)
|
||||
* @param persistenceUnitRootLocation the persistence unit root location to use as a
|
||||
* fallback or {@code null}
|
||||
* @since 3.4.4
|
||||
*/
|
||||
public EntityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter,
|
||||
Function<DataSource, Map<String, ?>> jpaPropertiesFactory,
|
||||
@@ -116,7 +114,6 @@ public class EntityManagerFactoryBuilder {
|
||||
* Configure the bootstrap executor to be used by the
|
||||
* {@link LocalContainerEntityManagerFactoryBean}.
|
||||
* @param bootstrapExecutor the executor
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public void setBootstrapExecutor(AsyncTaskExecutor bootstrapExecutor) {
|
||||
this.bootstrapExecutor = bootstrapExecutor;
|
||||
@@ -127,7 +124,6 @@ public class EntityManagerFactoryBuilder {
|
||||
* to be applied to the PersistenceUnitInfo used for creating the
|
||||
* {@link LocalContainerEntityManagerFactoryBean}.
|
||||
* @param persistenceUnitPostProcessors the persistence unit post processors to use
|
||||
* @since 2.5.0
|
||||
*/
|
||||
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... persistenceUnitPostProcessors) {
|
||||
this.persistenceUnitPostProcessors = persistenceUnitPostProcessors;
|
||||
@@ -173,7 +169,7 @@ public class EntityManagerFactoryBuilder {
|
||||
* @return the builder for fluent usage
|
||||
* @see #managedTypes(PersistenceManagedTypes)
|
||||
*/
|
||||
public Builder packages(String @Nullable ... packagesToScan) {
|
||||
public Builder packages(String @Nullable... packagesToScan) {
|
||||
this.packagesToScan = packagesToScan;
|
||||
return this;
|
||||
}
|
||||
@@ -226,7 +222,7 @@ public class EntityManagerFactoryBuilder {
|
||||
* @param mappingResources the mapping resources to use
|
||||
* @return the builder for fluent usage
|
||||
*/
|
||||
public Builder mappingResources(String @Nullable ... mappingResources) {
|
||||
public Builder mappingResources(String @Nullable... mappingResources) {
|
||||
this.mappingResources = mappingResources;
|
||||
return this;
|
||||
}
|
||||
|
||||
-1
@@ -87,7 +87,6 @@ public class EntityScanner {
|
||||
* @param context the {@link ApplicationContext} to use
|
||||
* @return a {@link ClassPathScanningCandidateComponentProvider} suitable to scan
|
||||
* entities
|
||||
* @since 2.4.0
|
||||
*/
|
||||
protected ClassPathScanningCandidateComponentProvider createClassPathScanningCandidateComponentProvider(
|
||||
ApplicationContext context) {
|
||||
|
||||
-2
@@ -134,7 +134,6 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
|
||||
/**
|
||||
* Set if x-forward-* headers should be processed.
|
||||
* @param useForwardHeaders if x-forward headers should be used
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public void setUseForwardHeaders(boolean useForwardHeaders) {
|
||||
this.useForwardHeaders = useForwardHeaders;
|
||||
@@ -143,7 +142,6 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
|
||||
/**
|
||||
* Set the {@link ReactorResourceFactory} to get the shared resources from.
|
||||
* @param resourceFactory the server resources
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public void setResourceFactory(@Nullable ReactorResourceFactory resourceFactory) {
|
||||
this.resourceFactory = resourceFactory;
|
||||
|
||||
-1
@@ -108,7 +108,6 @@ public class SslServerCustomizer implements NettyServerCustomizer {
|
||||
* Create an {@link AbstractProtocolSslContextSpec} for a given {@link SslBundle}.
|
||||
* @param sslBundle the {@link SslBundle} to use
|
||||
* @return an {@link AbstractProtocolSslContextSpec} instance
|
||||
* @since 4.0.0
|
||||
*/
|
||||
protected final AbstractProtocolSslContextSpec<?> createSslContextSpec(SslBundle sslBundle) {
|
||||
AbstractProtocolSslContextSpec<?> sslContextSpec = (this.http2 != null && this.http2.isEnabled())
|
||||
|
||||
-21
@@ -245,7 +245,6 @@ public class RestTemplateBuilder {
|
||||
* previously defined interceptors.
|
||||
* @param interceptors the interceptors to set
|
||||
* @return a new builder instance
|
||||
* @since 1.4.1
|
||||
* @see #additionalInterceptors(ClientHttpRequestInterceptor...)
|
||||
*/
|
||||
public RestTemplateBuilder interceptors(ClientHttpRequestInterceptor... interceptors) {
|
||||
@@ -259,7 +258,6 @@ public class RestTemplateBuilder {
|
||||
* previously defined interceptors.
|
||||
* @param interceptors the interceptors to set
|
||||
* @return a new builder instance
|
||||
* @since 1.4.1
|
||||
* @see #additionalInterceptors(ClientHttpRequestInterceptor...)
|
||||
*/
|
||||
public RestTemplateBuilder interceptors(Collection<ClientHttpRequestInterceptor> interceptors) {
|
||||
@@ -275,7 +273,6 @@ public class RestTemplateBuilder {
|
||||
* that should be used with the {@link RestTemplate}.
|
||||
* @param interceptors the interceptors to add
|
||||
* @return a new builder instance
|
||||
* @since 1.4.1
|
||||
* @see #interceptors(ClientHttpRequestInterceptor...)
|
||||
*/
|
||||
public RestTemplateBuilder additionalInterceptors(ClientHttpRequestInterceptor... interceptors) {
|
||||
@@ -288,7 +285,6 @@ public class RestTemplateBuilder {
|
||||
* that should be used with the {@link RestTemplate}.
|
||||
* @param interceptors the interceptors to add
|
||||
* @return a new builder instance
|
||||
* @since 1.4.1
|
||||
* @see #interceptors(ClientHttpRequestInterceptor...)
|
||||
*/
|
||||
public RestTemplateBuilder additionalInterceptors(Collection<? extends ClientHttpRequestInterceptor> interceptors) {
|
||||
@@ -317,7 +313,6 @@ public class RestTemplateBuilder {
|
||||
* each time we {@link #build()} a new {@link RestTemplate} instance.
|
||||
* @param requestFactorySupplier the supplier for the request factory
|
||||
* @return a new builder instance
|
||||
* @since 2.0.0
|
||||
* @see ClientHttpRequestFactoryBuilder#of(Supplier)
|
||||
* @see #requestFactoryBuilder(ClientHttpRequestFactoryBuilder)
|
||||
*/
|
||||
@@ -331,7 +326,6 @@ public class RestTemplateBuilder {
|
||||
* {@link #build()} a new {@link RestTemplate} instance.
|
||||
* @param requestFactoryBuilder the {@link ClientHttpRequestFactoryBuilder} to use
|
||||
* @return a new builder instance
|
||||
* @since 3.4.0
|
||||
* @see ClientHttpRequestFactoryBuilder
|
||||
*/
|
||||
public RestTemplateBuilder requestFactoryBuilder(ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder) {
|
||||
@@ -375,7 +369,6 @@ public class RestTemplateBuilder {
|
||||
* @param username the user name
|
||||
* @param password the password
|
||||
* @return a new builder instance
|
||||
* @since 2.1.0
|
||||
* @see #basicAuthentication(String, String, Charset)
|
||||
*/
|
||||
public RestTemplateBuilder basicAuthentication(String username, String password) {
|
||||
@@ -389,7 +382,6 @@ public class RestTemplateBuilder {
|
||||
* @param password the password
|
||||
* @param charset the charset to use
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public RestTemplateBuilder basicAuthentication(String username, String password, @Nullable Charset charset) {
|
||||
return new RestTemplateBuilder(this.clientSettings, this.detectRequestFactory, this.rootUri,
|
||||
@@ -404,7 +396,6 @@ public class RestTemplateBuilder {
|
||||
* @param name the name of the header
|
||||
* @param values the header values
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public RestTemplateBuilder defaultHeader(String name, String... values) {
|
||||
Assert.notNull(name, "'name' must not be null");
|
||||
@@ -421,7 +412,6 @@ public class RestTemplateBuilder {
|
||||
* readTimeout} and {@link #sslBundle(SslBundle) sslBundle} values.
|
||||
* @param clientSettings the client settings
|
||||
* @return a new builder instance
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public RestTemplateBuilder clientSettings(HttpClientSettings clientSettings) {
|
||||
Assert.notNull(clientSettings, "'clientSettings' must not be null");
|
||||
@@ -435,7 +425,6 @@ public class RestTemplateBuilder {
|
||||
* @param clientSettingsCustomizer a {@link UnaryOperator} to update client factory
|
||||
* settings
|
||||
* @return a new builder instance
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public RestTemplateBuilder clientSettings(UnaryOperator<HttpClientSettings> clientSettingsCustomizer) {
|
||||
Assert.notNull(clientSettingsCustomizer, "'clientSettingsCustomizer' must not be null");
|
||||
@@ -449,7 +438,6 @@ public class RestTemplateBuilder {
|
||||
* Sets the connection timeout on the underlying {@link ClientHttpRequestFactory}.
|
||||
* @param connectTimeout the connection timeout
|
||||
* @return a new builder instance.
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public RestTemplateBuilder connectTimeout(Duration connectTimeout) {
|
||||
return new RestTemplateBuilder(this.clientSettings.withConnectTimeout(connectTimeout),
|
||||
@@ -462,7 +450,6 @@ public class RestTemplateBuilder {
|
||||
* Sets the read timeout on the underlying {@link ClientHttpRequestFactory}.
|
||||
* @param readTimeout the read timeout
|
||||
* @return a new builder instance.
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public RestTemplateBuilder readTimeout(Duration readTimeout) {
|
||||
return new RestTemplateBuilder(this.clientSettings.withReadTimeout(readTimeout), this.detectRequestFactory,
|
||||
@@ -475,7 +462,6 @@ public class RestTemplateBuilder {
|
||||
* Sets the redirect strategy on the underlying {@link ClientHttpRequestFactory}.
|
||||
* @param redirects the redirect strategy
|
||||
* @return a new builder instance.
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public RestTemplateBuilder redirects(HttpRedirects redirects) {
|
||||
return new RestTemplateBuilder(this.clientSettings.withRedirects(redirects), this.detectRequestFactory,
|
||||
@@ -488,7 +474,6 @@ public class RestTemplateBuilder {
|
||||
* Sets the SSL bundle on the underlying {@link ClientHttpRequestFactory}.
|
||||
* @param sslBundle the SSL bundle
|
||||
* @return a new builder instance
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public RestTemplateBuilder sslBundle(SslBundle sslBundle) {
|
||||
return new RestTemplateBuilder(this.clientSettings.withSslBundle(sslBundle), this.detectRequestFactory,
|
||||
@@ -564,7 +549,6 @@ public class RestTemplateBuilder {
|
||||
* configured request customizers.
|
||||
* @param requestCustomizers the request customizers to set
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
* @see #additionalRequestCustomizers(RestTemplateRequestCustomizer...)
|
||||
*/
|
||||
public RestTemplateBuilder requestCustomizers(RestTemplateRequestCustomizer<?>... requestCustomizers) {
|
||||
@@ -579,7 +563,6 @@ public class RestTemplateBuilder {
|
||||
* configured request customizers.
|
||||
* @param requestCustomizers the request customizers to set
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
* @see #additionalRequestCustomizers(RestTemplateRequestCustomizer...)
|
||||
*/
|
||||
public RestTemplateBuilder requestCustomizers(
|
||||
@@ -597,7 +580,6 @@ public class RestTemplateBuilder {
|
||||
* order that they were added.
|
||||
* @param requestCustomizers the request customizers to add
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
* @see #requestCustomizers(RestTemplateRequestCustomizer...)
|
||||
*/
|
||||
public RestTemplateBuilder additionalRequestCustomizers(RestTemplateRequestCustomizer<?>... requestCustomizers) {
|
||||
@@ -611,7 +593,6 @@ public class RestTemplateBuilder {
|
||||
* order that they were added.
|
||||
* @param requestCustomizers the request customizers to add
|
||||
* @return a new builder instance
|
||||
* @since 2.2.0
|
||||
* @see #requestCustomizers(Collection)
|
||||
*/
|
||||
public RestTemplateBuilder additionalRequestCustomizers(
|
||||
@@ -685,7 +666,6 @@ public class RestTemplateBuilder {
|
||||
* Build a new {@link ClientHttpRequestFactory} instance using the settings of this
|
||||
* builder.
|
||||
* @return a {@link ClientHttpRequestFactory} or {@code null}
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public @Nullable ClientHttpRequestFactory buildRequestFactory() {
|
||||
ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder = requestFactoryBuilder();
|
||||
@@ -696,7 +676,6 @@ public class RestTemplateBuilder {
|
||||
* Return a {@link ClientHttpRequestFactoryBuilder} instance using the settings of
|
||||
* this builder.
|
||||
* @return a {@link ClientHttpRequestFactoryBuilder} or {@code null}
|
||||
* @since 3.5.0
|
||||
*/
|
||||
public @Nullable ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder() {
|
||||
if (this.requestFactoryBuilder != null) {
|
||||
|
||||
-2
@@ -981,7 +981,6 @@ public class TestRestTemplate {
|
||||
* type (when possible).
|
||||
* @param clientSettings the new client settings
|
||||
* @return the new template
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public TestRestTemplate withClientSettings(HttpClientSettings clientSettings) {
|
||||
return new TestRestTemplate(this.builder.clientSettings(clientSettings),
|
||||
@@ -995,7 +994,6 @@ public class TestRestTemplate {
|
||||
* type (when possible).
|
||||
* @param clientSettingsCustomizer a {@link UnaryOperator} to update the settings
|
||||
* @return the new template
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public TestRestTemplate withClientSettings(UnaryOperator<HttpClientSettings> clientSettingsCustomizer) {
|
||||
return new TestRestTemplate(this.builder.clientSettings(clientSettingsCustomizer),
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
*
|
||||
* @author Verónica Vásquez
|
||||
* @author Eddú Meléndez
|
||||
* @since 2.7.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
+1
-5
@@ -58,7 +58,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
* @author Madhura Bhave
|
||||
* @author Phillip Webb
|
||||
* @author Chris Bono
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public final class EndpointRequest {
|
||||
|
||||
@@ -130,7 +130,6 @@ public final class EndpointRequest {
|
||||
* @param webServerNamespace the web server namespace
|
||||
* @param endpoints the endpoints to include
|
||||
* @return the configured {@link RequestMatcher}
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public static AdditionalPathsEndpointRequestMatcher toAdditionalPaths(WebServerNamespace webServerNamespace,
|
||||
Class<?>... endpoints) {
|
||||
@@ -146,7 +145,6 @@ public final class EndpointRequest {
|
||||
* @param webServerNamespace the web server namespace
|
||||
* @param endpoints the endpoints to include
|
||||
* @return the configured {@link RequestMatcher}
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public static AdditionalPathsEndpointRequestMatcher toAdditionalPaths(WebServerNamespace webServerNamespace,
|
||||
String... endpoints) {
|
||||
@@ -326,7 +324,6 @@ public final class EndpointRequest {
|
||||
* @param httpMethod the HTTP method to include
|
||||
* @return a copy of the matcher further restricted to only match requests with
|
||||
* the specified HTTP method
|
||||
* @since 3.5.0
|
||||
*/
|
||||
public EndpointRequestMatcher withHttpMethod(HttpMethod httpMethod) {
|
||||
return new EndpointRequestMatcher(this.includes, this.excludes, this.includeLinks, httpMethod);
|
||||
@@ -430,7 +427,6 @@ public final class EndpointRequest {
|
||||
* @param httpMethod the HTTP method to include
|
||||
* @return a copy of the matcher further restricted to only match requests with
|
||||
* the specified HTTP method
|
||||
* @since 3.5.0
|
||||
*/
|
||||
public AdditionalPathsEndpointRequestMatcher withHttpMethod(HttpMethod httpMethod) {
|
||||
return new AdditionalPathsEndpointRequestMatcher(this.webServerNamespace, this.endpoints, httpMethod);
|
||||
|
||||
-1
@@ -75,7 +75,6 @@ public interface ConfigurableTomcatWebServerFactory extends ConfigurableWebServe
|
||||
* Add {@link TomcatProtocolHandlerCustomizer}s that should be added to the Tomcat
|
||||
* {@link Connector}.
|
||||
* @param tomcatProtocolHandlerCustomizers the customizers to add
|
||||
* @since 4.0.0
|
||||
*/
|
||||
void addProtocolHandlerCustomizers(TomcatProtocolHandlerCustomizer<?>... tomcatProtocolHandlerCustomizers);
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ import org.springframework.util.unit.DataSize;
|
||||
* @author Florian Storz
|
||||
* @author Michael Weidmann
|
||||
* @author Lasse Wulff
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("server")
|
||||
public class ServerProperties {
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.springframework.context.ConfigurableApplicationContext;
|
||||
* addition to the methods in the {WebServerApplicationContext} interface.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface ConfigurableWebServerApplicationContext
|
||||
extends ConfigurableApplicationContext, WebServerApplicationContext {
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.springframework.boot.web.server.WebServerFactory;
|
||||
*
|
||||
* @author Guirong Hu
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.7.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class MissingWebServerFactoryBeanException extends NoSuchBeanDefinitionException {
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Phillip Webb
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class ServerPortInfoApplicationContextInitializer implements
|
||||
ApplicationContextInitializer<ConfigurableApplicationContext>, ApplicationListener<WebServerInitializedEvent> {
|
||||
|
||||
+5
-6
@@ -28,7 +28,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* create and manage the lifecycle of an embedded {@link WebServer}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface WebServerApplicationContext extends ApplicationContext {
|
||||
|
||||
@@ -42,7 +42,6 @@ public interface WebServerApplicationContext extends ApplicationContext {
|
||||
/**
|
||||
* {@link SmartLifecycle#getPhase() SmartLifecycle phase} in which starting and
|
||||
* stopping of the web server is performed.
|
||||
* @since 4.0.0
|
||||
*/
|
||||
int START_STOP_LIFECYCLE_PHASE = GRACEFUL_SHUTDOWN_PHASE - 1024;
|
||||
|
||||
@@ -51,7 +50,8 @@ public interface WebServerApplicationContext extends ApplicationContext {
|
||||
* the server has not yet been created.
|
||||
* @return the web server
|
||||
*/
|
||||
@Nullable WebServer getWebServer();
|
||||
@Nullable
|
||||
WebServer getWebServer();
|
||||
|
||||
/**
|
||||
* Returns the namespace of the web server application context or {@code null} if no
|
||||
@@ -60,7 +60,8 @@ public interface WebServerApplicationContext extends ApplicationContext {
|
||||
* different port).
|
||||
* @return the server namespace
|
||||
*/
|
||||
@Nullable String getServerNamespace();
|
||||
@Nullable
|
||||
String getServerNamespace();
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the specified context is a
|
||||
@@ -68,7 +69,6 @@ public interface WebServerApplicationContext extends ApplicationContext {
|
||||
* @param context the context to check
|
||||
* @param serverNamespace the server namespace to match against
|
||||
* @return {@code true} if the server namespace of the context matches
|
||||
* @since 2.1.8
|
||||
*/
|
||||
static boolean hasServerNamespace(@Nullable ApplicationContext context, String serverNamespace) {
|
||||
return (context instanceof WebServerApplicationContext webServerApplicationContext)
|
||||
@@ -81,7 +81,6 @@ public interface WebServerApplicationContext extends ApplicationContext {
|
||||
* @param context the context
|
||||
* @return the server namespace or {@code null} if the context is not a
|
||||
* {@link WebServerApplicationContext}
|
||||
* @since 2.6.0
|
||||
*/
|
||||
static @Nullable String getServerNamespace(@Nullable ApplicationContext context) {
|
||||
return (context instanceof WebServerApplicationContext configurableContext)
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import org.springframework.context.SmartLifecycle;
|
||||
* {@link SmartLifecycle} to trigger {@link WebServer} graceful shutdown.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.5.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public final class WebServerGracefulShutdownLifecycle implements SmartLifecycle {
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.springframework.context.ApplicationEvent;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class WebServerInitializedEvent extends ApplicationEvent {
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author David Liu
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class WebServerPortFileWriter implements ApplicationListener<WebServerInitializedEvent> {
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* to deliberately override certain bean definitions through an extra Configuration class.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
* @see #register(Class...)
|
||||
* @see #scan(String...)
|
||||
* @see ReactiveWebServerApplicationContext
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.util.StringUtils;
|
||||
* from a contained {@link ReactiveWebServerFactory} bean.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class ReactiveWebServerApplicationContext extends GenericReactiveWebApplicationContext
|
||||
implements ConfigurableWebServerApplicationContext {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.springframework.boot.web.server.context.WebServerInitializedEvent;
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class ReactiveWebServerInitializedEvent extends WebServerInitializedEvent {
|
||||
|
||||
|
||||
-2
@@ -69,7 +69,6 @@ public interface ConfigurableServletWebServerFactory
|
||||
/**
|
||||
* Sets the display name of the application deployed in the web server.
|
||||
* @param displayName the displayName to set
|
||||
* @since 4.0.0
|
||||
*/
|
||||
default void setDisplayName(String displayName) {
|
||||
getSettings().setDisplayName(displayName);
|
||||
@@ -105,7 +104,6 @@ public interface ConfigurableServletWebServerFactory
|
||||
/**
|
||||
* Adds mime-type mappings.
|
||||
* @param mimeMappings the mime type mappings to add
|
||||
* @since 4.0.0
|
||||
*/
|
||||
default void addMimeMappings(MimeMappings mimeMappings) {
|
||||
getSettings().addMimeMappings(mimeMappings);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import jakarta.servlet.annotation.WebListener;
|
||||
* Interface to be implemented by types that register {@link WebListener @WebListeners}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface WebListenerRegistrar {
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ import org.springframework.util.ClassUtils;
|
||||
* to deliberately override certain bean definitions through an extra Configuration class.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
* @see #register(Class...)
|
||||
* @see #scan(String...)
|
||||
* @see ServletWebServerApplicationContext
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* absence, scanning will be performed from the package of the class with the annotation.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 1.3.0
|
||||
* @since 4.0.0
|
||||
* @see WebServlet
|
||||
* @see WebFilter
|
||||
* @see WebListener
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
* @author Phillip Webb
|
||||
* @author Dave Syer
|
||||
* @author Scott Frederick
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
* @see AnnotationConfigServletWebServerApplicationContext
|
||||
* @see XmlServletWebServerApplicationContext
|
||||
* @see ServletWebServerFactory
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import org.springframework.boot.web.server.context.WebServerInitializedEvent;
|
||||
* stop and start it if they want to.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServletWebServerInitializedEvent extends WebServerInitializedEvent {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.web.context.support.ServletContextAwareProcessor;
|
||||
* initialized.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class WebApplicationContextServletContextAwareProcessor extends ServletContextAwareProcessor {
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.springframework.web.context.support.XmlWebApplicationContext;
|
||||
* bean definitions through an extra XML file.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
* @see #setNamespace
|
||||
* @see #setConfigLocations
|
||||
* @see ServletWebServerApplicationContext
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.springframework.web.reactive.function.client.WebClient;
|
||||
* WebClient.Builder}.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface WebClientCustomizer {
|
||||
|
||||
-1
@@ -104,7 +104,6 @@ public @interface WebFluxTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
-1
@@ -109,7 +109,6 @@ public @interface WebMvcTest {
|
||||
* Properties in form {@literal key=value} that should be added to the Spring
|
||||
* {@link Environment} before the test runs.
|
||||
* @return the properties to add
|
||||
* @since 2.1.0
|
||||
*/
|
||||
String[] properties() default {};
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.ws.test.server.MockWebServiceClient;
|
||||
* {@link MockWebServiceClient}.
|
||||
*
|
||||
* @author Daniil Razorenov
|
||||
* @since 2.6.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
* auto-configuration of web service servers endpoints.
|
||||
*
|
||||
* @author Daniil Razorenov
|
||||
* @since 2.6.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.springframework.ws.test.server.MockWebServiceClient;
|
||||
* Auto-configuration for {@link MockWebServiceClient} support.
|
||||
*
|
||||
* @author Daniil Razorenov
|
||||
* @since 2.6.0
|
||||
* @since 4.0.0
|
||||
* @see AutoConfigureMockWebServiceClient
|
||||
*/
|
||||
@AutoConfiguration
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
* rather than this annotation.
|
||||
*
|
||||
* @author Daniil Razorenov
|
||||
* @since 2.6.0
|
||||
* @since 4.0.0
|
||||
* @see AutoConfigureMockWebServiceClient
|
||||
* @see AutoConfigureWebServiceServer
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user