See gh-28239
This commit is contained in:
Leo Li
2021-09-28 13:30:11 +08:00
committed by Stephane Nicoll
parent f00052054e
commit 1770f065a5
23 changed files with 47 additions and 47 deletions

View File

@@ -229,7 +229,7 @@ public class SpringApplication {
/**
* Create a new {@link SpringApplication} instance. The application context will load
* beans from the specified primary sources (see {@link SpringApplication class-level}
* documentation for details. The instance can be customized before calling
* documentation for details). The instance can be customized before calling
* {@link #run(String...)}.
* @param primarySources the primary bean sources
* @see #run(Class, String[])
@@ -243,7 +243,7 @@ public class SpringApplication {
/**
* Create a new {@link SpringApplication} instance. The application context will load
* beans from the specified primary sources (see {@link SpringApplication class-level}
* documentation for details. The instance can be customized before calling
* documentation for details). The instance can be customized before calling
* {@link #run(String...)}.
* @param resourceLoader the resource loader to use
* @param primarySources the primary bean sources
@@ -675,7 +675,7 @@ public class SpringApplication {
/**
* Either the ClassLoader that will be used in the ApplicationContext (if
* {@link #setResourceLoader(ResourceLoader) resourceLoader} is set, or the context
* {@link #setResourceLoader(ResourceLoader) resourceLoader} is set), or the context
* class loader (if not null), or the loader of the Spring {@link ClassUtils} class.
* @return a ClassLoader (never null)
*/

View File

@@ -20,7 +20,7 @@ import org.springframework.context.ApplicationContext;
/**
* Interface that can be used to add or remove code that should run when the JVM is
* shutdown. Shutdown handers are similar to JVM {@link Runtime#addShutdownHook(Thread)
* shutdown. Shutdown handlers are similar to JVM {@link Runtime#addShutdownHook(Thread)
* shutdown hooks} except that they run sequentially rather than concurrently.
* <p>
* Shutdown handlers are guaranteed to be called only after registered

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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 @@ public interface ApplicationAvailability {
* @param <S> the state type
* @param stateType the state type
* @param defaultState the default state to return if no event of the given type has
* been published yet (must not be {@code null}.
* been published yet (must not be {@code null}).
* @return the readiness state
* @see #getState(Class)
*/

View File

@@ -85,7 +85,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
* {@link ConfigDataEnvironmentContributors} instance.
* @param importer the importer used to import {@link ConfigData}
* @param activationContext the current activation context or {@code null} if the
* context has not get been created
* context has not got been created
* @return a {@link ConfigDataEnvironmentContributors} instance with all relevant
* imports have been processed
*/

View File

@@ -63,7 +63,7 @@ public final class ConfigDataLocation implements OriginProvider {
/**
* Return the value of the location (always excluding any user specified
* {@code optional:} prefix.
* {@code optional:} prefix).
* @return the location value
*/
public String getValue() {

View File

@@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
* equivalent.
* <p>
* The "{@code [}" and "{@code ]}" characters may be used to indicate an associative
* index(i.e. a {@link Map} key or a {@link Collection} index. Indexes names are not
* index(i.e. a {@link Map} key or a {@link Collection} index). Indexes names are not
* restricted and are considered case-sensitive.
* <p>
* Here are some typical examples:

View File

@@ -100,7 +100,7 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
}
/**
* Add {@link NettyServerCustomizer}s that should applied while building the server.
* Add {@link NettyServerCustomizer}s that should apply while building the server.
* @param serverCustomizers the customizers to add
*/
public void addServerCustomizers(NettyServerCustomizer... serverCustomizers) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2021 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,7 +40,7 @@ import org.springframework.web.filter.DelegatingFilterProxy;
* <p>
* Registrations can be associated with {@link #setUrlPatterns URL patterns} and/or
* servlets (either by {@link #setServletNames name} or via a
* {@link #setServletRegistrationBeans ServletRegistrationBean}s. When no URL pattern or
* {@link #setServletRegistrationBeans ServletRegistrationBean}s). When no URL pattern or
* servlets are specified the filter will be associated to '/*'. The targetBeanName will
* be used as the filter name if not otherwise specified.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2021 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.util.Assert;
* The {@link #setFilter(Filter) Filter} must be specified before calling
* {@link #onStartup(ServletContext)}. Registrations can be associated with
* {@link #setUrlPatterns URL patterns} and/or servlets (either by {@link #setServletNames
* name} or via a {@link #setServletRegistrationBeans ServletRegistrationBean}s. When no
* name} or via a {@link #setServletRegistrationBeans ServletRegistrationBean}s). When no
* URL pattern or servlets are specified the filter will be associated to '/*'. The filter
* name will be deduced if not specified.
*

View File

@@ -251,7 +251,7 @@ class ConfigFileApplicationListenerTests {
@Test
void randomValue() {
// dont need
// don't need
this.initializer.postProcessEnvironment(this.environment, this.application);
String property = this.environment.getProperty("random.value");
assertThat(property).isNotNull();

View File

@@ -163,7 +163,7 @@ class SpringConfigurationPropertySourcesTests {
}
@Test // gh-21659
void shouldAdaptRandomePropertySource() {
void shouldAdaptRandomPropertySource() {
MutablePropertySources sources = new MutablePropertySources();
sources.addFirst(new RandomValuePropertySource());
Iterator<ConfigurationPropertySource> iterator = new SpringConfigurationPropertySources(sources).iterator();

View File

@@ -43,7 +43,7 @@ class DataSourceScriptDatabaseInitializerTests
private final HikariDataSource embeddedDataSource = DataSourceBuilder.create().type(HikariDataSource.class)
.url("jdbc:h2:mem:" + UUID.randomUUID()).build();
private final HikariDataSource standloneDataSource = DataSourceBuilder.create().type(HikariDataSource.class)
private final HikariDataSource standaloneDataSource = DataSourceBuilder.create().type(HikariDataSource.class)
.url("jdbc:h2:file:" + new BuildOutput(DataSourceScriptDatabaseInitializerTests.class).getRootLocation()
.getAbsolutePath() + "/" + UUID.randomUUID())
.build();
@@ -51,7 +51,7 @@ class DataSourceScriptDatabaseInitializerTests
@AfterEach
void closeDataSource() {
this.embeddedDataSource.close();
this.standloneDataSource.close();
this.standaloneDataSource.close();
}
@Test
@@ -70,7 +70,7 @@ class DataSourceScriptDatabaseInitializerTests
@Override
protected DataSourceScriptDatabaseInitializer createStandaloneDatabaseInitializer(
DatabaseInitializationSettings settings) {
return new DataSourceScriptDatabaseInitializer(this.standloneDataSource, settings);
return new DataSourceScriptDatabaseInitializer(this.standaloneDataSource, settings);
}
@Override
@@ -80,7 +80,7 @@ class DataSourceScriptDatabaseInitializerTests
@Override
protected int numberOfStandaloneRows(String sql) {
return numberOfRows(this.standloneDataSource, sql);
return numberOfRows(this.standaloneDataSource, sql);
}
private int numberOfRows(DataSource dataSource, String sql) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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.
@@ -180,7 +180,7 @@ class OriginTrackedResourceTests {
}
@Test
void ofWhenWritableReturnsOriginTrackedWrtiableResource() {
void ofWhenWritableReturnsOriginTrackedWritableResource() {
Resource resource = mock(WritableResource.class);
Resource tracked = OriginTrackedResource.of(resource, this.origin);
assertThat(tracked).isInstanceOf(WritableResource.class)