mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge pull request #22524 from dreis2211
* pr/22524: Polish Closes gh-22524
This commit is contained in:
commit
5800f1596c
@ -759,7 +759,7 @@ For example, the following file has two logical documents:
|
||||
spring.application.name: MyCloudApp
|
||||
----
|
||||
|
||||
For `appliation.properties` files a special `#---` comment is used to mark the document splits:
|
||||
For `application.properties` files a special `#---` comment is used to mark the document splits:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
@ -3148,7 +3148,7 @@ If a Servlet filter wraps the request, it should be configured with an order tha
|
||||
TIP: To see the order of every `Filter` in your application, enable debug level logging for the `web` <<boot-features-custom-log-groups,logging group>> (`logging.level.web=debug`).
|
||||
Details of the registered filters, including their order and URL patterns, will then be logged at startup.
|
||||
|
||||
WARNING: Take care when registering `Filter` beans since they are initialized very early in the application lifectyle.
|
||||
WARNING: Take care when registering `Filter` beans since they are initialized very early in the application lifecycle.
|
||||
If you need to register a `Filter` that interacts with other beans, consider using a {spring-boot-module-api}/web/servlet/DelegatingFilterProxyRegistrationBean.html[`DelegatingFilterProxyRegistrationBean`] instead.
|
||||
|
||||
|
||||
|
@ -198,7 +198,7 @@ class ConfigDataEnvironment {
|
||||
|
||||
private ConfigDataEnvironmentContributors processWithoutProfiles(ConfigDataEnvironmentContributors contributors,
|
||||
ConfigDataImporter importer, ConfigDataActivationContext activationContext) {
|
||||
this.logger.trace("Processing config data environment contributors with intial activation context");
|
||||
this.logger.trace("Processing config data environment contributors with initial activation context");
|
||||
return contributors.withProcessedImports(importer, activationContext);
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ class ConfigDataEnvironment {
|
||||
}
|
||||
DefaultPropertiesPropertySource.moveToEnd(propertySources);
|
||||
Profiles profiles = activationContext.getProfiles();
|
||||
this.logger.trace(LogMessage.format("Setting default profies: %s", profiles.getDefault()));
|
||||
this.logger.trace(LogMessage.format("Setting default profiles: %s", profiles.getDefault()));
|
||||
this.environment.setDefaultProfiles(StringUtils.toStringArray(profiles.getDefault()));
|
||||
this.logger.trace(LogMessage.format("Setting active profiles: %s", profiles.getActive()));
|
||||
this.environment.setActiveProfiles(StringUtils.toStringArray(profiles.getActive()));
|
||||
|
@ -43,7 +43,7 @@ class ConfigDataImporter {
|
||||
/**
|
||||
* Create a new {@link ConfigDataImporter} instance.
|
||||
* @param resolvers the config data location resolvers
|
||||
* @param loaders the condif data loaders
|
||||
* @param loaders the config data loaders
|
||||
*/
|
||||
ConfigDataImporter(ConfigDataLocationResolvers resolvers, ConfigDataLoaders loaders) {
|
||||
this.resolvers = resolvers;
|
||||
@ -65,7 +65,7 @@ class ConfigDataImporter {
|
||||
return load(this.resolvers.resolveAll(locationResolverContext, locations, profiles));
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new IllegalStateException("IO errorload imports from " + locations, ex);
|
||||
throw new IllegalStateException("IO error on loading imports from " + locations, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class ConfigDataLoaders {
|
||||
|
||||
/**
|
||||
* Load {@link ConfigData} using the first appropriate {@link ConfigDataLoader}.
|
||||
* @param <L> the condig data location type
|
||||
* @param <L> the config data location type
|
||||
* @param location the location to load
|
||||
* @return the loaded {@link ConfigData}
|
||||
* @throws IOException on IO error
|
||||
|
@ -193,7 +193,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationEvent event) {
|
||||
throw new IllegalStateException(
|
||||
"ConfigFileApplicationListener is deprected and can only be used as an EnvironmentPostProcessor");
|
||||
"ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,7 +51,7 @@ class Instantiator<T> {
|
||||
/**
|
||||
* Create a new {@link Instantiator} instance for the given type.
|
||||
* @param type the type to instantiate
|
||||
* @param availableParameters consumer used to register avaiable parameters
|
||||
* @param availableParameters consumer used to register available parameters
|
||||
*/
|
||||
Instantiator(Class<?> type, Consumer<AvailableParameters> availableParameters) {
|
||||
this.type = type;
|
||||
|
@ -41,13 +41,13 @@ class OriginTrackedPropertiesLoaderTests {
|
||||
|
||||
private ClassPathResource resource;
|
||||
|
||||
private List<Document> documentes;
|
||||
private List<Document> documents;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() throws Exception {
|
||||
String path = "test-properties.properties";
|
||||
this.resource = new ClassPathResource(path, getClass());
|
||||
this.documentes = new OriginTrackedPropertiesLoader(this.resource).load();
|
||||
this.documents = new OriginTrackedPropertiesLoader(this.resource).load();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -257,7 +257,7 @@ class OriginTrackedPropertiesLoaderTests {
|
||||
}
|
||||
|
||||
private OriginTrackedValue getFromFirst(String key) {
|
||||
return this.documentes.get(0).asMap().get(key);
|
||||
return this.documents.get(0).asMap().get(key);
|
||||
}
|
||||
|
||||
private Object getValue(OriginTrackedValue value) {
|
||||
|
@ -129,7 +129,7 @@ class OriginTrackedYamlLoaderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void emptyDocumentes() {
|
||||
void emptyDocuments() {
|
||||
this.loader = new OriginTrackedYamlLoader(new ClassPathResource("test-empty-yaml.yml", getClass()));
|
||||
List<Map<String, Object>> loaded = this.loader.load();
|
||||
assertThat(loaded).isEmpty();
|
||||
|
Loading…
Reference in New Issue
Block a user