Replace 'via' with 'over' or 'through' in the documentation

Closes gh-33878
This commit is contained in:
Moritz Halbritter
2023-01-18 16:56:42 +01:00
parent b5cebed120
commit e8d809fe65
99 changed files with 146 additions and 135 deletions

View File

@@ -77,7 +77,7 @@ public interface ApplicationContextFactory {
/**
* Creates an {@code ApplicationContextFactory} that will create contexts by
* instantiating the given {@code contextClass} via its primary constructor.
* instantiating the given {@code contextClass} through its primary constructor.
* @param contextClass the context class
* @return the factory that will instantiate the context class
* @see BeanUtils#instantiateClass(Class)

View File

@@ -17,7 +17,7 @@
package org.springframework.boot;
/**
* A {@link BootstrapContext} that also provides configuration methods via the
* A {@link BootstrapContext} that also provides configuration methods through the
* {@link BootstrapRegistry} interface.
*
* @author Phillip Webb

View File

@@ -513,7 +513,7 @@ public class SpringApplication {
/**
* Configure which profiles are active (or active by default) for this application
* environment. Additional profiles may be activated during configuration file
* processing via the {@code spring.profiles.active} property.
* processing through the {@code spring.profiles.active} property.
* @param environment this application's environment
* @param args arguments passed to the {@code run} method
* @see #configureEnvironment(ConfigurableEnvironment, String[])
@@ -1305,8 +1305,8 @@ public class SpringApplication {
/**
* A basic main that can be used to launch an application. This method is useful when
* application sources are defined via a {@literal --spring.main.sources} command line
* argument.
* application sources are defined through a {@literal --spring.main.sources} command
* line argument.
* <p>
* Most developers will want to define their own main method and call the
* {@link #run(Class, String...) run} method instead.

View File

@@ -25,9 +25,9 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
/**
* Listener for the {@link SpringApplication} {@code run} method.
* {@link SpringApplicationRunListener}s are loaded via the {@link SpringFactoriesLoader}
* and should declare a public constructor that accepts a {@link SpringApplication}
* instance and a {@code String[]} of arguments. A new
* {@link SpringApplicationRunListener}s are loaded through the
* {@link SpringFactoriesLoader} and should declare a public constructor that accepts a
* {@link SpringApplication} instance and a {@code String[]} of arguments. A new
* {@link SpringApplicationRunListener} instance will be created for each run.
*
* @author Phillip Webb

View File

@@ -22,7 +22,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
/**
* Callback interface used to support custom reporting of {@link SpringApplication}
* startup errors. {@link SpringBootExceptionReporter reporters} are loaded via the
* startup errors. {@link SpringBootExceptionReporter reporters} are loaded through the
* {@link SpringFactoriesLoader} and must declare a public constructor with a single
* {@link ConfigurableApplicationContext} parameter.
*

View File

@@ -17,7 +17,7 @@
package org.springframework.boot.admin;
/**
* An MBean contract to control and monitor a running {@code SpringApplication} via JMX.
* An MBean contract to control and monitor a running {@code SpringApplication} over JMX.
* Intended for internal use only.
*
* @author Stephane Nicoll

View File

@@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext;
* Components can inject this class to get the current state information. To update the
* state of the application an {@link AvailabilityChangeEvent} should be
* {@link ApplicationContext#publishEvent published} to the application context with
* directly or via {@link AvailabilityChangeEvent#publish}.
* directly or through {@link AvailabilityChangeEvent#publish}.
*
* @author Brian Clozel
* @author Phillip Webb

View File

@@ -50,7 +50,7 @@ import org.springframework.util.StringUtils;
* {@link ConfigDataEnvironmentContributors} by wrapping property sources from the Spring
* {@link Environment} and adding the initial set of locations.
* <p>
* The initial locations can be influenced via the {@link #LOCATION_PROPERTY},
* The initial locations can be influenced through the {@link #LOCATION_PROPERTY},
* {@value #ADDITIONAL_LOCATION_PROPERTY} and {@value #IMPORT_PROPERTY} properties. If no
* explicit properties are set, the {@link #DEFAULT_SEARCH_LOCATIONS} will be used.
*

View File

@@ -34,7 +34,8 @@ import org.springframework.core.log.LogMessage;
import org.springframework.util.Assert;
/**
* A collection of {@link ConfigDataLoader} instances loaded via {@code spring.factories}.
* A collection of {@link ConfigDataLoader} instances loaded through
* {@code spring.factories}.
*
* @author Phillip Webb
* @author Madhura Bhave

View File

@@ -357,7 +357,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
Set<Profile> includedViaProperty = getProfiles(binder, INCLUDE_PROFILES_PROPERTY);
List<Profile> otherActiveProfiles = getOtherActiveProfiles(activatedViaProperty, includedViaProperty);
this.profiles.addAll(otherActiveProfiles);
// Any pre-existing active profiles set via property sources (e.g.
// Any pre-existing active profiles set through property sources (e.g.
// System properties) take precedence over those added in config files.
this.profiles.addAll(includedViaProperty);
addActiveProfiles(activatedViaProperty);

View File

@@ -39,7 +39,8 @@ import org.springframework.util.StringUtils;
/**
* {@link ImportBeanDefinitionRegistrar} for registering
* {@link ConfigurationProperties @ConfigurationProperties} bean definitions via scanning.
* {@link ConfigurationProperties @ConfigurationProperties} bean definitions through
* scanning.
*
* @author Madhura Bhave
* @author Phillip Webb

View File

@@ -181,7 +181,8 @@ public final class PropertyMapper {
}
/**
* Return an adapted version of the source changed via the given adapter function.
* Return an adapted version of the source changed through the given adapter
* function.
* @param <R> the resulting type
* @param adapter the adapter to apply
* @return a new adapted source instance

View File

@@ -153,7 +153,7 @@ public class ApplicationConversionService extends FormattingConversionService {
* type.
* @param sourceType the source type to test
* @param targetType the target type to test
* @return if conversion happens via an {@code ObjectTo...} converter
* @return if conversion happens through an {@code ObjectTo...} converter
* @since 2.4.3
*/
public boolean isConvertViaObjectSourceType(TypeDescriptor sourceType, TypeDescriptor targetType) {

View File

@@ -53,7 +53,7 @@ public class EnvironmentPostProcessorApplicationListener implements SmartApplica
/**
* Create a new {@link EnvironmentPostProcessorApplicationListener} with
* {@link EnvironmentPostProcessor} classes loaded via {@code spring.factories}.
* {@link EnvironmentPostProcessor} classes loaded through {@code spring.factories}.
*/
public EnvironmentPostProcessorApplicationListener() {
this(EnvironmentPostProcessorsFactory::fromSpringFactories, new DeferredLogs());

View File

@@ -24,7 +24,7 @@ import org.springframework.core.io.Resource;
import org.springframework.core.io.support.SpringFactoriesLoader;
/**
* Strategy interface located via {@link SpringFactoriesLoader} and used to load a
* Strategy interface located through {@link SpringFactoriesLoader} and used to load a
* {@link PropertySource}.
*
* @author Dave Syer

View File

@@ -22,7 +22,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Logger groups configured via the Spring Environment.
* Logger groups configured through the Spring Environment.
*
* @author HaiTao Zhang
* @author Phillip Webb

View File

@@ -35,7 +35,7 @@ import org.springframework.core.env.PropertySource;
* {@link ApplicationContextInitializer} that sets {@link Environment} properties for the
* ports that {@link RSocketServer} servers are actually listening on. The property
* {@literal "local.rsocket.server.port"} can be injected directly into tests using
* {@link Value @Value} or obtained via the {@link Environment}.
* {@link Value @Value} or obtained through the {@link Environment}.
* <p>
* Properties are automatically propagated up to any parent context.
*

View File

@@ -26,7 +26,7 @@ import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
/**
* Resolves any message parameters via {@link MessageSource} and then interpolates a
* Resolves any message parameters through {@link MessageSource} and then interpolates a
* message using the underlying {@link MessageInterpolator}.
*
* @author Dmytro Nosan

View File

@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
* {@link ApplicationContextInitializer} that sets {@link Environment} properties for the
* ports that {@link WebServer} servers are actually listening on. The property
* {@literal "local.server.port"} can be injected directly into tests using
* {@link Value @Value} or obtained via the {@link Environment}.
* {@link Value @Value} or obtained through the {@link Environment}.
* <p>
* If the {@link WebServerInitializedEvent} has a
* {@link WebServerApplicationContext#getServerNamespace() server namespace} , it will be

View File

@@ -33,7 +33,7 @@ import org.springframework.stereotype.Component;
* <p>
* Note: In case of multiple {@code @Configuration} classes, later {@code @Bean}
* definitions will override ones defined in earlier loaded files. This can be leveraged
* to deliberately override certain bean definitions via an extra Configuration class.
* to deliberately override certain bean definitions through an extra Configuration class.
*
* @author Phillip Webb
* @author Stephane Nicoll

View File

@@ -50,7 +50,7 @@ import org.springframework.util.ObjectUtils;
* <p>
* Note: In case of multiple {@code @Configuration} classes, later {@code @Bean}
* definitions will override ones defined in earlier loaded files. This can be leveraged
* to deliberately override certain bean definitions via an extra Configuration class.
* to deliberately override certain bean definitions through an extra Configuration class.
*
* @author Phillip Webb
* @since 2.0.0

View File

@@ -39,7 +39,7 @@ import org.springframework.web.filter.DelegatingFilterProxy;
* marked {@code @Lazy} it won't be instantiated at all until the filter is called.
* <p>
* Registrations can be associated with {@link #setUrlPatterns URL patterns} and/or
* servlets (either by {@link #setServletNames name} or via a
* servlets (either by {@link #setServletNames name} or through a
* {@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

@@ -29,9 +29,9 @@ 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
* URL pattern or servlets are specified the filter will be associated to '/*'. The filter
* name will be deduced if not specified.
* name} or through 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.
*
* @param <T> the type of {@link Filter} to register
* @author Phillip Webb

View File

@@ -28,7 +28,7 @@ import org.springframework.core.type.filter.TypeFilter;
import org.springframework.util.Assert;
/**
* Abstract base class for handlers of Servlet components discovered via classpath
* Abstract base class for handlers of Servlet components discovered through classpath
* scanning.
*
* @author Andy Wilkinson

View File

@@ -49,7 +49,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
* <p>
* Note: In case of multiple {@code @Configuration} classes, later {@code @Bean}
* definitions will override ones defined in earlier loaded files. This can be leveraged
* to deliberately override certain bean definitions via an extra Configuration class.
* to deliberately override certain bean definitions through an extra Configuration class.
*
* @author Stephane Nicoll
* @since 2.2.0

View File

@@ -47,7 +47,7 @@ import org.springframework.util.ClassUtils;
* <p>
* Note: In case of multiple {@code @Configuration} classes, later {@code @Bean}
* definitions will override ones defined in earlier loaded files. This can be leveraged
* to deliberately override certain bean definitions via an extra Configuration class.
* to deliberately override certain bean definitions through an extra Configuration class.
*
* @author Phillip Webb
* @since 1.0.0

View File

@@ -29,7 +29,7 @@ import org.springframework.web.context.support.XmlWebApplicationContext;
* <p>
* Note: In case of multiple config locations, later bean definitions will override ones
* defined in earlier loaded files. This can be leveraged to deliberately override certain
* bean definitions via an extra XML file.
* bean definitions through an extra XML file.
*
* @author Phillip Webb
* @since 1.0.0

View File

@@ -81,7 +81,7 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
/**
* Set if the {@link ErrorPageFilter} should be registered. Set to {@code false} if
* error page mappings should be handled via the server and not Spring Boot.
* error page mappings should be handled through the server and not Spring Boot.
* @param registerErrorPageFilter if the {@link ErrorPageFilter} should be registered.
*/
protected final void setRegisterErrorPageFilter(boolean registerErrorPageFilter) {

View File

@@ -440,7 +440,7 @@ class ConfigFileApplicationListenerTests {
@Test
void profilesAddedToEnvironmentAndViaProperty(CapturedOutput output) {
// External profile takes precedence over profile added via the environment
// External profile takes precedence over profile added through the environment
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, "spring.profiles.active=other");
this.environment.addActiveProfile("dev");
this.initializer.postProcessEnvironment(this.environment, this.application);

View File

@@ -184,7 +184,8 @@ class ServletWebServerMvcIntegrationTests {
@Bean
DispatcherServlet dispatcherServlet() {
// Can configure dispatcher servlet here as would usually do via init-params
// Can configure dispatcher servlet here as would usually do through
// init-params
return new DispatcherServlet();
}