parent
4bcec6e0ee
commit
dbfc6bded4
|
@ -20,7 +20,7 @@ import org.springframework.boot.build.bom.Library;
|
||||||
import org.springframework.boot.build.bom.bomr.version.DependencyVersion;
|
import org.springframework.boot.build.bom.bomr.version.DependencyVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An upgrade to change a {@link Library} to use a new version}.
|
* An upgrade to change a {@link Library} to use a new version.
|
||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,8 +29,7 @@ import org.gradle.tooling.events.FinishEvent;
|
||||||
import org.gradle.tooling.events.OperationCompletionListener;
|
import org.gradle.tooling.events.OperationCompletionListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link BuildService} that provides an overview of all of the test failures in the
|
* {@link BuildService} that provides an overview of all the test failures in the build.
|
||||||
* build.
|
|
||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,12 +53,12 @@ class DependencyVersionTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void parseWhenCalendarVersionShouldReturnArticatVersionDependencyVersion() {
|
void parseWhenCalendarVersionShouldReturnArtifactVersionDependencyVersion() {
|
||||||
assertThat(DependencyVersion.parse("2020.0.0")).isInstanceOf(CalendarVersionDependencyVersion.class);
|
assertThat(DependencyVersion.parse("2020.0.0")).isInstanceOf(CalendarVersionDependencyVersion.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void parseWhenCalendarVersionWithModifierShouldReturnArticatVersionDependencyVersion() {
|
void parseWhenCalendarVersionWithModifierShouldReturnArtifactVersionDependencyVersion() {
|
||||||
assertThat(DependencyVersion.parse("2020.0.0-M1")).isInstanceOf(CalendarVersionDependencyVersion.class);
|
assertThat(DependencyVersion.parse("2020.0.0-M1")).isInstanceOf(CalendarVersionDependencyVersion.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -805,7 +805,7 @@ required to use this feature.</description>
|
||||||
<type>long</type>
|
<type>long</type>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<editable>true</editable>
|
<editable>true</editable>
|
||||||
<description>The number of milli-seconds to wait between each attempt to check if the spring
|
<description>The number of milliseconds to wait between each attempt to check if the spring
|
||||||
application is ready.</description>
|
application is ready.</description>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter>
|
<parameter>
|
||||||
|
|
|
@ -25,9 +25,9 @@ import java.lang.annotation.Target;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Conditional @Conditional} that checks whether or not a default health indicator
|
* {@link Conditional @Conditional} that checks whether a default health indicator is
|
||||||
* is enabled. Matches if the value of the {@code management.health.<name>.enabled}
|
* enabled. Matches if the value of the {@code management.health.<name>.enabled} property
|
||||||
* property is {@code true}. Otherwise, matches if the value of the
|
* is {@code true}. Otherwise, matches if the value of the
|
||||||
* {@code management.health.defaults.enabled} property is {@code true} or if it is not
|
* {@code management.health.defaults.enabled} property is {@code true} or if it is not
|
||||||
* configured.
|
* configured.
|
||||||
*
|
*
|
||||||
|
|
|
@ -44,8 +44,8 @@ public abstract class HealthProperties {
|
||||||
private Show showComponents;
|
private Show showComponents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Roles used to determine whether or not a user is authorized to be shown details.
|
* Roles used to determine whether a user is authorized to be shown details. When
|
||||||
* When empty, all authenticated users are authorized.
|
* empty, all authenticated users are authorized.
|
||||||
*/
|
*/
|
||||||
private Set<String> roles = new HashSet<>();
|
private Set<String> roles = new HashSet<>();
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.lang.annotation.Target;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Conditional @Conditional} that checks whether or not an info contributor is
|
* {@link Conditional @Conditional} that checks whether an info contributor is enabled.
|
||||||
* enabled. Matches if the value of the {@code management.info.<name>.enabled} property is
|
* Matches if the value of the {@code management.info.<name>.enabled} property is
|
||||||
* {@code true}. Otherwise, use the specific {@link #fallback() fallback} method.
|
* {@code true}. Otherwise, use the specific {@link #fallback() fallback} method.
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
|
@ -25,11 +25,11 @@ import java.lang.annotation.Target;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Conditional @Conditional} that checks whether or not a metrics exporter is
|
* {@link Conditional @Conditional} that checks whether a metrics exporter is enabled. If
|
||||||
* enabled. If the {@code management.metrics.export.<name>.enabled} property is configured
|
* the {@code management.metrics.export.<name>.enabled} property is configured then its
|
||||||
* then its value is used to determine if it matches. Otherwise, matches if the value of
|
* value is used to determine if it matches. Otherwise, matches if the value of the
|
||||||
* the {@code management.metrics.export.defaults.enabled} property is {@code true} or if
|
* {@code management.metrics.export.defaults.enabled} property is {@code true} or if it is
|
||||||
* it is not configured.
|
* not configured.
|
||||||
*
|
*
|
||||||
* @author Chris Bono
|
* @author Chris Bono
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class GangliaProperties {
|
||||||
private GMetric.UDPAddressingMode addressingMode = GMetric.UDPAddressingMode.MULTICAST;
|
private GMetric.UDPAddressingMode addressingMode = GMetric.UDPAddressingMode.MULTICAST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time to live for metrics on Ganglia. Set the multi-cast Time-To-Live to be one
|
* Time to live for metrics on Ganglia. Set the multicast Time-To-Live to be one
|
||||||
* greater than the number of hops (routers) between the hosts.
|
* greater than the number of hops (routers) between the hosts.
|
||||||
*/
|
*/
|
||||||
private Integer timeToLive = 1;
|
private Integer timeToLive = 1;
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class InvocationContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not the context is capable of resolving an argument of the given
|
* Returns whether the context is capable of resolving an argument of the given
|
||||||
* {@code type}. Note that, even when {@code true} is returned,
|
* {@code type}. Note that, even when {@code true} is returned,
|
||||||
* {@link #resolveArgument argument resolution} will return {@code null} if no
|
* {@link #resolveArgument argument resolution} will return {@code null} if no
|
||||||
* argument of the required type is available.
|
* argument of the required type is available.
|
||||||
|
|
|
@ -49,9 +49,9 @@ public interface Producible<E extends Enum<E> & Producible<E>> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if this enum value should be used as the default value when an accept header
|
* Return if this enum value should be used as the default value when an accept header
|
||||||
* of */* is provided, or if the accept header is missing. Only one value
|
* of */* is provided, or if the {@code Accept} header is missing. Only
|
||||||
* can be marked as default. If no value is marked, then the value with the highest
|
* one value can be marked as default. If no value is marked, then the value with the
|
||||||
* {@link Enum#ordinal() ordinal} is used as the default.
|
* highest {@link Enum#ordinal() ordinal} is used as the default.
|
||||||
* @return if this value should be used as the default value
|
* @return if this value should be used as the default value
|
||||||
* @since 2.5.6
|
* @since 2.5.6
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class Link {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not the {@link #getHref() href} is templated.
|
* Returns whether the {@link #getHref() href} is templated.
|
||||||
* @return {@code true} if the href is templated, otherwise {@code false}
|
* @return {@code true} if the href is templated, otherwise {@code false}
|
||||||
*/
|
*/
|
||||||
public boolean isTemplated() {
|
public boolean isTemplated() {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import reactor.core.publisher.Mono;
|
||||||
* Strategy interface used to contribute {@link Health} to the results returned from the
|
* Strategy interface used to contribute {@link Health} to the results returned from the
|
||||||
* reactive variant of the {@link HealthEndpoint}.
|
* reactive variant of the {@link HealthEndpoint}.
|
||||||
* <p>
|
* <p>
|
||||||
* This is non blocking contract that is meant to be used in a reactive application. See
|
* This is non-blocking contract that is meant to be used in a reactive application. See
|
||||||
* {@link HealthIndicator} for the traditional contract.
|
* {@link HealthIndicator} for the traditional contract.
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
|
@ -84,9 +84,9 @@ class StartupTimeMetricsListenerTests {
|
||||||
Tags tags = Tags.of("foo", "bar");
|
Tags tags = Tags.of("foo", "bar");
|
||||||
this.listener = new StartupTimeMetricsListener(this.registry, "started", "ready", tags);
|
this.listener = new StartupTimeMetricsListener(this.registry, "started", "ready", tags);
|
||||||
this.listener.onApplicationEvent(new ApplicationReadyEvent(application, null, null, Duration.ofSeconds(2)));
|
this.listener.onApplicationEvent(new ApplicationReadyEvent(application, null, null, Duration.ofSeconds(2)));
|
||||||
TimeGauge applicationReadyGague = this.registry.find("ready").timeGauge();
|
TimeGauge applicationReadyGauge = this.registry.find("ready").timeGauge();
|
||||||
assertThat(applicationReadyGague).isNotNull();
|
assertThat(applicationReadyGauge).isNotNull();
|
||||||
assertThat(applicationReadyGague.getId().getTags()).containsExactlyElementsOf(tags);
|
assertThat(applicationReadyGauge.getId().getTags()).containsExactlyElementsOf(tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -80,14 +80,13 @@ public @interface ConditionalOnBean {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The annotation type decorating a bean that should be checked. The condition matches
|
* The annotation type decorating a bean that should be checked. The condition matches
|
||||||
* when all of the annotations specified are defined on beans in the
|
* when all the annotations specified are defined on beans in the {@link BeanFactory}.
|
||||||
* {@link BeanFactory}.
|
|
||||||
* @return the class-level annotation types to check
|
* @return the class-level annotation types to check
|
||||||
*/
|
*/
|
||||||
Class<? extends Annotation>[] annotation() default {};
|
Class<? extends Annotation>[] annotation() default {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The names of beans to check. The condition matches when all of the bean names
|
* The names of beans to check. The condition matches when all the bean names
|
||||||
* specified are contained in the {@link BeanFactory}.
|
* specified are contained in the {@link BeanFactory}.
|
||||||
* @return the names of beans to check
|
* @return the names of beans to check
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -345,7 +345,7 @@ public class FlywayProperties {
|
||||||
private String oracleKerberosCacheFile;
|
private String oracleKerberosCacheFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Location of the Oracle Wallet, used to sign-in to the database automatically.
|
* Location of the Oracle Wallet, used to sign in to the database automatically.
|
||||||
* Requires Flyway Teams.
|
* Requires Flyway Teams.
|
||||||
*/
|
*/
|
||||||
private String oracleWalletLocation;
|
private String oracleWalletLocation;
|
||||||
|
|
|
@ -695,7 +695,7 @@ public class KafkaProperties {
|
||||||
private String applicationId;
|
private String applicationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not to auto-start the streams factory bean.
|
* Whether to auto-start the streams factory bean.
|
||||||
*/
|
*/
|
||||||
private boolean autoStartup = true;
|
private boolean autoStartup = true;
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
||||||
protected abstract Map<String, Object> getVendorProperties();
|
protected abstract Map<String, Object> getVendorProperties();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customize vendor properties before they are used. Allows for post processing (for
|
* Customize vendor properties before they are used. Allows for post-processing (for
|
||||||
* example to configure JTA specific settings).
|
* example to configure JTA specific settings).
|
||||||
* @param vendorProperties the vendor properties to customize
|
* @param vendorProperties the vendor properties to customize
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,10 +25,9 @@ import java.lang.annotation.Target;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Conditional @Conditional} that checks whether or not the Spring resource
|
* {@link Conditional @Conditional} that checks whether the Spring resource handling chain
|
||||||
* handling chain is enabled. Matches if
|
* is enabled. Matches if {@link WebProperties.Resources.Chain#getEnabled()} is
|
||||||
* {@link WebProperties.Resources.Chain#getEnabled()} is {@code true} or if
|
* {@code true} or if {@code webjars-locator-core} is on the classpath.
|
||||||
* {@code webjars-locator-core} is on the classpath.
|
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
* @since 1.3.0
|
* @since 1.3.0
|
||||||
|
|
|
@ -27,8 +27,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Condition} that checks whether or not the Spring resource handling chain is
|
* {@link Condition} that checks whether the Spring resource handling chain is enabled.
|
||||||
* enabled.
|
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
|
|
|
@ -141,7 +141,7 @@ class Neo4jAutoConfigurationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Deprecated
|
@Deprecated
|
||||||
void determineServerUriWithCustoUriShouldTakePrecedenceOverDeprecatedProperty() {
|
void determineServerUriWithCustomUriShouldTakePrecedenceOverDeprecatedProperty() {
|
||||||
URI customUri = URI.create("bolt://localhost:4242");
|
URI customUri = URI.create("bolt://localhost:4242");
|
||||||
URI anotherCustomURI = URI.create("bolt://localhost:2424");
|
URI anotherCustomURI = URI.create("bolt://localhost:2424");
|
||||||
Neo4jProperties properties = new Neo4jProperties();
|
Neo4jProperties properties = new Neo4jProperties();
|
||||||
|
|
|
@ -105,9 +105,8 @@ class ProjectGenerationRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the project archive should be extracted in the output location. If
|
* Whether the project archive should be extracted in the output location. If the
|
||||||
* the {@link #getOutput() output} ends with "/", the project is extracted
|
* {@link #getOutput() output} ends with "/", the project is extracted automatically.
|
||||||
* automatically.
|
|
||||||
* @return {@code true} if the archive should be extracted, otherwise {@code false}
|
* @return {@code true} if the archive should be extracted, otherwise {@code false}
|
||||||
*/
|
*/
|
||||||
boolean isExtract() {
|
boolean isExtract() {
|
||||||
|
@ -242,7 +241,7 @@ class ProjectGenerationRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the type should be detected based on the build and format value.
|
* Whether the type should be detected based on the build and format value.
|
||||||
* @return {@code true} if type detection will be performed, otherwise {@code false}
|
* @return {@code true} if type detection will be performed, otherwise {@code false}
|
||||||
*/
|
*/
|
||||||
boolean isDetectType() {
|
boolean isDetectType() {
|
||||||
|
|
|
@ -143,7 +143,7 @@ public abstract class AstUtils {
|
||||||
* optionally removing it from the block at the same time.
|
* optionally removing it from the block at the same time.
|
||||||
* @param block a block statement (class definition)
|
* @param block a block statement (class definition)
|
||||||
* @param name the name to look for
|
* @param name the name to look for
|
||||||
* @param remove whether or not the extracted closure should be removed
|
* @param remove whether the extracted closure should be removed
|
||||||
* @return a beans Closure if one can be found, null otherwise
|
* @return a beans Closure if one can be found, null otherwise
|
||||||
*/
|
*/
|
||||||
public static ClosureExpression getClosure(BlockStatement block, String name, boolean remove) {
|
public static ClosureExpression getClosure(BlockStatement block, String name, boolean remove) {
|
||||||
|
|
|
@ -105,8 +105,8 @@ public class DependencyCustomizer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a nested {@link DependencyCustomizer} that only applies if all of the
|
* Create a nested {@link DependencyCustomizer} that only applies if all the specified
|
||||||
* specified class names are not on the class path.
|
* class names are not on the class path.
|
||||||
* @param classNames the class names to test
|
* @param classNames the class names to test
|
||||||
* @return a nested {@link DependencyCustomizer}
|
* @return a nested {@link DependencyCustomizer}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -89,7 +89,7 @@ class RestartServerTests {
|
||||||
@Test
|
@Test
|
||||||
void updateReplacesLocalFilesWhenPossible(@TempDir File directory) throws Exception {
|
void updateReplacesLocalFilesWhenPossible(@TempDir File directory) throws Exception {
|
||||||
// This is critical for Cloud Foundry support where the application is
|
// This is critical for Cloud Foundry support where the application is
|
||||||
// run exploded and resources can be found from the servlet root (outside of the
|
// run exploded and resources can be found from the servlet root (outside the
|
||||||
// classloader)
|
// classloader)
|
||||||
File classFile = new File(directory, "ClassA.class");
|
File classFile = new File(directory, "ClassA.class");
|
||||||
FileCopyUtils.copy("abc".getBytes(), classFile);
|
FileCopyUtils.copy("abc".getBytes(), classFile);
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.junit.runners.model.Statement;
|
||||||
import static org.hamcrest.Matchers.allOf;
|
import static org.hamcrest.Matchers.allOf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JUnit {@code @Rule} to capture output from System.out and System.err.
|
* JUnit {@code @Rule} to capture output from {@code System.out} and {@code System.err}.
|
||||||
* <p>
|
* <p>
|
||||||
* To use add as a {@link Rule @Rule}:
|
* To use add as a {@link Rule @Rule}:
|
||||||
*
|
*
|
||||||
|
|
|
@ -56,7 +56,7 @@ import org.springframework.web.util.UriTemplateHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenient alternative of {@link RestTemplate} that is suitable for integration tests.
|
* Convenient alternative of {@link RestTemplate} that is suitable for integration tests.
|
||||||
* {@code TestRestTemplate} is fault tolerant. This means that 4xx and 5xx do not result
|
* {@code TestRestTemplate} is fault-tolerant. This means that 4xx and 5xx do not result
|
||||||
* in an exception being thrown and can instead be detected via the {@link ResponseEntity
|
* in an exception being thrown and can instead be detected via the {@link ResponseEntity
|
||||||
* response entity} and its {@link ResponseEntity#getStatusCode() status code}.
|
* response entity} and its {@link ResponseEntity#getStatusCode() status code}.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -641,12 +641,12 @@ public class TestRestTemplate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the value of the Allow header for the given URI.
|
* Return the value of the {@code Allow} header for the given URI.
|
||||||
* <p>
|
* <p>
|
||||||
* URI Template variables are expanded using the given URI variables, if any.
|
* URI Template variables are expanded using the given URI variables, if any.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param urlVariables the variables to expand in the template
|
* @param urlVariables the variables to expand in the template
|
||||||
* @return the value of the allow header
|
* @return the value of the {@code Allow} header
|
||||||
* @see RestTemplate#optionsForAllow(java.lang.String, java.lang.Object[])
|
* @see RestTemplate#optionsForAllow(java.lang.String, java.lang.Object[])
|
||||||
*/
|
*/
|
||||||
public Set<HttpMethod> optionsForAllow(String url, Object... urlVariables) {
|
public Set<HttpMethod> optionsForAllow(String url, Object... urlVariables) {
|
||||||
|
@ -654,12 +654,12 @@ public class TestRestTemplate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the value of the Allow header for the given URI.
|
* Return the value of the {@code Allow} header for the given URI.
|
||||||
* <p>
|
* <p>
|
||||||
* URI Template variables are expanded using the given map.
|
* URI Template variables are expanded using the given map.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param urlVariables the variables to expand in the template
|
* @param urlVariables the variables to expand in the template
|
||||||
* @return the value of the allow header
|
* @return the value of the {@code Allow} header
|
||||||
* @see RestTemplate#optionsForAllow(java.lang.String, java.util.Map)
|
* @see RestTemplate#optionsForAllow(java.lang.String, java.util.Map)
|
||||||
*/
|
*/
|
||||||
public Set<HttpMethod> optionsForAllow(String url, Map<String, ?> urlVariables) {
|
public Set<HttpMethod> optionsForAllow(String url, Map<String, ?> urlVariables) {
|
||||||
|
@ -667,9 +667,9 @@ public class TestRestTemplate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the value of the Allow header for the given URL.
|
* Return the value of the {@code Allow} header for the given URL.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @return the value of the allow header
|
* @return the value of the {@code Allow} header
|
||||||
* @see RestTemplate#optionsForAllow(java.net.URI)
|
* @see RestTemplate#optionsForAllow(java.net.URI)
|
||||||
*/
|
*/
|
||||||
public Set<HttpMethod> optionsForAllow(URI url) {
|
public Set<HttpMethod> optionsForAllow(URI url) {
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class ImageArchive implements TarArchive {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the create data of the archive.
|
* Return the create date of the archive.
|
||||||
* @return the create date
|
* @return the create date
|
||||||
*/
|
*/
|
||||||
public Instant getCreateDate() {
|
public Instant getCreateDate() {
|
||||||
|
|
|
@ -72,7 +72,7 @@ public final class VolumeName {
|
||||||
* Factory method to create a new {@link VolumeName} with a random name.
|
* Factory method to create a new {@link VolumeName} with a random name.
|
||||||
* @param prefix the prefix to use with the random name
|
* @param prefix the prefix to use with the random name
|
||||||
* @param randomLength the number of chars in the random part of the name
|
* @param randomLength the number of chars in the random part of the name
|
||||||
* @return a randomly volume reference
|
* @return a randomly named volume reference
|
||||||
*/
|
*/
|
||||||
public static VolumeName random(String prefix, int randomLength) {
|
public static VolumeName random(String prefix, int randomLength) {
|
||||||
return of(RandomString.generate(prefix, randomLength));
|
return of(RandomString.generate(prefix, randomLength));
|
||||||
|
|
|
@ -632,13 +632,13 @@ public class JSONArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes this array as a human readable JSON string for debugging, such as: <pre>
|
* Encodes this array as a human-readable JSON string for debugging, such as: <pre>
|
||||||
* [
|
* [
|
||||||
* 94043,
|
* 94043,
|
||||||
* 90210
|
* 90210
|
||||||
* ]</pre>
|
* ]</pre>
|
||||||
* @param indentSpaces the number of spaces to indent for each level of nesting.
|
* @param indentSpaces the number of spaces to indent for each level of nesting.
|
||||||
* @return a human readable JSON string of this array
|
* @return a human-readable JSON string of this array
|
||||||
* @throws JSONException if processing of json failed
|
* @throws JSONException if processing of json failed
|
||||||
*/
|
*/
|
||||||
public String toString(int indentSpaces) throws JSONException {
|
public String toString(int indentSpaces) throws JSONException {
|
||||||
|
|
|
@ -708,7 +708,7 @@ public class JSONObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes this object as a human readable JSON string for debugging, such as: <pre>
|
* Encodes this object as a human-readable JSON string for debugging, such as: <pre>
|
||||||
* {
|
* {
|
||||||
* "query": "Pizza",
|
* "query": "Pizza",
|
||||||
* "locations": [
|
* "locations": [
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class JSONStringer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lexical scoping elements within this stringer, necessary to insert the appropriate
|
* Lexical scoping elements within this stringer, necessary to insert the appropriate
|
||||||
* separator characters (ie. commas and colons) and to detect nesting errors.
|
* separator characters (i.e. commas and colons) and to detect nesting errors.
|
||||||
*/
|
*/
|
||||||
enum Scope {
|
enum Scope {
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ package org.springframework.boot.configurationprocessor.json;
|
||||||
* <p>
|
* <p>
|
||||||
* For best interoperability and performance use JSON that complies with RFC 4627, such as
|
* For best interoperability and performance use JSON that complies with RFC 4627, such as
|
||||||
* that generated by {@link JSONStringer}. For legacy reasons this parser is lenient, so a
|
* that generated by {@link JSONStringer}. For legacy reasons this parser is lenient, so a
|
||||||
* successful parse does not indicate that the input string was valid JSON. All of the
|
* successful parse does not indicate that the input string was valid JSON. All the
|
||||||
* following syntax errors will be ignored:
|
* following syntax errors will be ignored:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>End of line comments starting with {@code //} or {@code #} and ending with a
|
* <li>End of line comments starting with {@code //} or {@code #} and ending with a
|
||||||
|
|
|
@ -375,8 +375,8 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An {@code UnpackHandler} determines whether or not unpacking is required and
|
* An {@code UnpackHandler} determines whether unpacking is required and provides a
|
||||||
* provides a SHA1 hash if required.
|
* SHA-1 hash if required.
|
||||||
*/
|
*/
|
||||||
interface UnpackHandler {
|
interface UnpackHandler {
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ final class Digest {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the SHA1 digest from the supplied stream.
|
* Return the SHA-1 digest from the supplied stream.
|
||||||
* @param supplier the stream supplier
|
* @param supplier the stream supplier
|
||||||
* @return the SHA1 digest
|
* @return the SHA-1 digest
|
||||||
* @throws IOException on IO error
|
* @throws IOException on IO error
|
||||||
*/
|
*/
|
||||||
static String sha1(InputStreamSupplier supplier) throws IOException {
|
static String sha1(InputStreamSupplier supplier) throws IOException {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public abstract class FileUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a SHA.1 Hash for a given file.
|
* Generate a SHA-1 Hash for a given file.
|
||||||
* @param file the file to hash
|
* @param file the file to hash
|
||||||
* @return the hash value as a String
|
* @return the hash value as a String
|
||||||
* @throws IOException if the file cannot be read
|
* @throws IOException if the file cannot be read
|
||||||
|
|
|
@ -145,7 +145,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
|
||||||
protected abstract boolean isNestedArchive(Archive.Entry entry);
|
protected abstract boolean isNestedArchive(Archive.Entry entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if post processing needs to be applied to the archives. For back
|
* Return if post-processing needs to be applied to the archives. For back
|
||||||
* compatibility this method returns {@code true}, but subclasses that don't override
|
* compatibility this method returns {@code true}, but subclasses that don't override
|
||||||
* {@link #postProcessClassPathArchives(List)} should provide an implementation that
|
* {@link #postProcessClassPathArchives(List)} should provide an implementation that
|
||||||
* returns {@code false}.
|
* returns {@code false}.
|
||||||
|
@ -160,7 +160,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
|
||||||
* Called to post-process archive entries before they are used. Implementations can
|
* Called to post-process archive entries before they are used. Implementations can
|
||||||
* add and remove entries.
|
* add and remove entries.
|
||||||
* @param archives the archives
|
* @param archives the archives
|
||||||
* @throws Exception if the post processing fails
|
* @throws Exception if the post-processing fails
|
||||||
* @see #isPostProcessingClassPathArchives()
|
* @see #isPostProcessingClassPathArchives()
|
||||||
*/
|
*/
|
||||||
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception {
|
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception {
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class PropertiesLauncher extends Launcher {
|
||||||
public static final String CONFIG_LOCATION = "loader.config.location";
|
public static final String CONFIG_LOCATION = "loader.config.location";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Properties key for boolean flag (default false) which if set will cause the
|
* Properties key for boolean flag (default false) which, if set, will cause the
|
||||||
* external configuration properties to be copied to System properties (assuming that
|
* external configuration properties to be copied to System properties (assuming that
|
||||||
* is allowed by Java security).
|
* is allowed by Java security).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -61,8 +61,8 @@ public class DefaultPropertiesPropertySource extends MapPropertySource {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a consume a new {@link DefaultPropertiesPropertySource} instance if the
|
* Create a new {@link DefaultPropertiesPropertySource} instance if the provided
|
||||||
* provided source is not empty.
|
* source is not empty.
|
||||||
* @param source the {@code Map} source
|
* @param source the {@code Map} source
|
||||||
* @param action the action used to consume the
|
* @param action the action used to consume the
|
||||||
* {@link DefaultPropertiesPropertySource}
|
* {@link DefaultPropertiesPropertySource}
|
||||||
|
|
|
@ -147,8 +147,8 @@ public class SpringApplicationBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an application context (and its parent if specified) with the command line
|
* Create an application context (and its parent if specified) with the command line
|
||||||
* args provided. The parent is run first with the same arguments if has not yet been
|
* args provided. The parent is run first with the same arguments if it has not yet
|
||||||
* started.
|
* been started.
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
* @return an application context created from the current state
|
* @return an application context created from the current state
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class CloudFoundryVcapEnvironmentPostProcessor implements EnvironmentPost
|
||||||
|
|
||||||
private final Log logger;
|
private final Log logger;
|
||||||
|
|
||||||
// Before ConfigFileApplicationListener so values there can use these ones
|
// Before ConfigFileApplicationListener so values there can use these
|
||||||
private int order = ConfigDataEnvironmentPostProcessor.ORDER - 1;
|
private int order = ConfigDataEnvironmentPostProcessor.ORDER - 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -35,8 +35,8 @@ import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A single element that may directly or indirectly contribute configuration data to the
|
* A single element that may directly or indirectly contribute configuration data to the
|
||||||
* {@link Environment}. There are several different {@link Kind kinds} of contributor, all
|
* {@link Environment}. There are several {@link Kind kinds} of contributor, all are
|
||||||
* are immutable and will be replaced with new versions as imports are processed.
|
* immutable and will be replaced with new versions as imports are processed.
|
||||||
* <p>
|
* <p>
|
||||||
* Contributors may provide a set of imports that should be processed and ultimately
|
* Contributors may provide a set of imports that should be processed and ultimately
|
||||||
* turned into children. There are two distinct import phases:
|
* turned into children. There are two distinct import phases:
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class EventPublishingRunListener implements SpringApplicationRunListener,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// An inactive context may not have a multicaster so we use our multicaster to
|
// An inactive context may not have a multicaster so we use our multicaster to
|
||||||
// call all of the context's listeners instead
|
// call all the context's listeners instead
|
||||||
if (context instanceof AbstractApplicationContext) {
|
if (context instanceof AbstractApplicationContext) {
|
||||||
for (ApplicationListener<?> listener : ((AbstractApplicationContext) context)
|
for (ApplicationListener<?> listener : ((AbstractApplicationContext) context)
|
||||||
.getApplicationListeners()) {
|
.getApplicationListeners()) {
|
||||||
|
|
|
@ -62,7 +62,7 @@ public enum DatabaseDriver {
|
||||||
"SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_USERS"),
|
"SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_USERS"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Lite.
|
* SQLite.
|
||||||
*/
|
*/
|
||||||
SQLITE("SQLite", "org.sqlite.JDBC"),
|
SQLITE("SQLite", "org.sqlite.JDBC"),
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.util.Assert;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connection details for embedded databases compatible with r2dbc.
|
* Connection details for embedded databases compatible with R2DBC.
|
||||||
*
|
*
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
|
@ -81,9 +81,9 @@ public class ApplicationTemp {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a sub-directory of the application temp.
|
* Return a subdirectory of the application temp.
|
||||||
* @param subDir the sub-directory name
|
* @param subDir the subdirectory name
|
||||||
* @return a sub-directory
|
* @return a subdirectory
|
||||||
*/
|
*/
|
||||||
public File getDir(String subDir) {
|
public File getDir(String subDir) {
|
||||||
return createDirectory(getPath().resolve(subDir)).toFile();
|
return createDirectory(getPath().resolve(subDir)).toFile();
|
||||||
|
|
|
@ -479,7 +479,7 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a mutable collection of Jetty {@link JettyServerCustomizer}s that will be
|
* Returns a mutable collection of Jetty {@link JettyServerCustomizer}s that will be
|
||||||
* applied to the {@link Server} before the it is created.
|
* applied to the {@link Server} before it is created.
|
||||||
* @return the {@link JettyServerCustomizer}s
|
* @return the {@link JettyServerCustomizer}s
|
||||||
*/
|
*/
|
||||||
public Collection<JettyServerCustomizer> getServerCustomizers() {
|
public Collection<JettyServerCustomizer> getServerCustomizers() {
|
||||||
|
@ -694,13 +694,13 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor
|
||||||
@Override
|
@Override
|
||||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
HttpServletResponse wrappedResponse = new ResposeWrapper(response);
|
HttpServletResponse wrappedResponse = new ResponseWrapper(response);
|
||||||
super.handle(target, baseRequest, request, wrappedResponse);
|
super.handle(target, baseRequest, request, wrappedResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ResposeWrapper extends HttpServletResponseWrapper {
|
class ResponseWrapper extends HttpServletResponseWrapper {
|
||||||
|
|
||||||
ResposeWrapper(HttpServletResponse response) {
|
ResponseWrapper(HttpServletResponse response) {
|
||||||
super(response);
|
super(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ public abstract class AbstractServletWebServerFactory extends AbstractConfigurab
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not the JSP servlet should be registered with the web server.
|
* Returns whether the JSP servlet should be registered with the web server.
|
||||||
* @return {@code true} if the servlet should be registered, otherwise {@code false}
|
* @return {@code true} if the servlet should be registered, otherwise {@code false}
|
||||||
*/
|
*/
|
||||||
protected boolean shouldRegisterJspServlet() {
|
protected boolean shouldRegisterJspServlet() {
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.springframework.boot.context.properties;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data object with a pubic method picked up by the {@code ObjectToObjectConverter}. Used
|
* Data object with a public method picked up by the {@code ObjectToObjectConverter}. Used
|
||||||
* in {@link ConfigurationPropertiesTests}.
|
* in {@link ConfigurationPropertiesTests}.
|
||||||
*
|
*
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
|
|
|
@ -76,7 +76,7 @@ class BinderTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void creatWhenSourcesIsNullIterableShouldThrowException() {
|
void createWhenSourcesIsNullIterableShouldThrowException() {
|
||||||
assertThatIllegalArgumentException().isThrownBy(() -> new Binder((Iterable<ConfigurationPropertySource>) null))
|
assertThatIllegalArgumentException().isThrownBy(() -> new Binder((Iterable<ConfigurationPropertySource>) null))
|
||||||
.withMessageContaining("Sources must not be null");
|
.withMessageContaining("Sources must not be null");
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class DatabaseDriverClassNameTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getInterfaceNames(String className) throws IOException {
|
private List<String> getInterfaceNames(String className) throws IOException {
|
||||||
// Use ASM to avoid unwanted side-effects of loading JDBC drivers
|
// Use ASM to avoid unwanted side effects of loading JDBC drivers
|
||||||
ClassReader classReader = new ClassReader(getClass().getResourceAsStream("/" + className + ".class"));
|
ClassReader classReader = new ClassReader(getClass().getResourceAsStream("/" + className + ".class"));
|
||||||
List<String> interfaceNames = new ArrayList<>();
|
List<String> interfaceNames = new ArrayList<>();
|
||||||
for (String name : classReader.getInterfaces()) {
|
for (String name : classReader.getInterfaces()) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ class AnnotationConfigServletWebServerApplicationContextTests {
|
||||||
ServletContextAwareEmbeddedConfiguration.class);
|
ServletContextAwareEmbeddedConfiguration.class);
|
||||||
verifyContext();
|
verifyContext();
|
||||||
// You can't initialize the application context and inject the servlet context
|
// You can't initialize the application context and inject the servlet context
|
||||||
// because of a cycle - we'd like this to be not null but it never will be
|
// because of a cycle - we'd like this to be not null, but it never will be
|
||||||
assertThat(this.context.getBean(ServletContextAwareEmbeddedConfiguration.class).getServletContext()).isNull();
|
assertThat(this.context.getBean(ServletContextAwareEmbeddedConfiguration.class).getServletContext()).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ class ServletWebServerApplicationContextTests {
|
||||||
@Test
|
@Test
|
||||||
void doesNotRegistersShutdownHook() {
|
void doesNotRegistersShutdownHook() {
|
||||||
// See gh-314 for background. We no longer register the shutdown hook
|
// See gh-314 for background. We no longer register the shutdown hook
|
||||||
// since it is really the callers responsibility. The shutdown hook could
|
// since it is really the caller's responsibility. The shutdown hook could
|
||||||
// also be problematic in a classic WAR deployment.
|
// also be problematic in a classic WAR deployment.
|
||||||
addWebServerFactoryBean();
|
addWebServerFactoryBean();
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
|
|
Loading…
Reference in New Issue