Polish Javadoc
Update Javadoc to add missing @return and @param elements.
This commit is contained in:
parent
e489ab9b29
commit
8e398dc6a7
|
@ -34,6 +34,7 @@ import static org.junit.Assert.assertThat;
|
|||
/**
|
||||
* Abstract base class for endpoint tests.
|
||||
*
|
||||
* @param <T> the endpoint type
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
|
||||
|
|
|
@ -133,6 +133,8 @@ public class RedisServer implements TestRule {
|
|||
* Try to obtain and validate a resource. Implementors should either set the
|
||||
* {@link #resource} field with a valid resource and return normally, or throw an
|
||||
* exception.
|
||||
* @return the jedis connection factory
|
||||
* @throws Exception if the factory cannot be obtained
|
||||
*/
|
||||
protected JedisConnectionFactory obtainResource() throws Exception {
|
||||
JedisConnectionFactory resource = new JedisConnectionFactory();
|
||||
|
|
|
@ -31,11 +31,13 @@ import static org.junit.Assert.assertEquals;
|
|||
* Abstract base class for {@link DataSourcePoolMetadata} tests.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @param <D> the data source pool metadata type
|
||||
*/
|
||||
public abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourcePoolMetadata<?>> {
|
||||
|
||||
/**
|
||||
* Return a data source metadata instance with a min size of 0 and max size of 2.
|
||||
* @return the data source metadata
|
||||
*/
|
||||
protected abstract D getDataSourceMetadata();
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.configurationprocessor;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -79,21 +80,21 @@ public class TestProject {
|
|||
}
|
||||
|
||||
private void copySources(Set<Class<?>> contents) throws IOException {
|
||||
for (Class<?> klass : contents) {
|
||||
copySources(klass);
|
||||
for (Class<?> type : contents) {
|
||||
copySources(type);
|
||||
}
|
||||
}
|
||||
|
||||
private void copySources(Class<?> klass) throws IOException {
|
||||
File original = getOriginalSourceFile(klass);
|
||||
File target = getSourceFile(klass);
|
||||
private void copySources(Class<?> type) throws IOException {
|
||||
File original = getOriginalSourceFile(type);
|
||||
File target = getSourceFile(type);
|
||||
target.getParentFile().mkdirs();
|
||||
FileCopyUtils.copy(original, target);
|
||||
this.sourceFiles.add(target);
|
||||
}
|
||||
|
||||
public File getSourceFile(Class<?> klass) {
|
||||
return new File(this.sourceFolder, sourcePathFor(klass));
|
||||
public File getSourceFile(Class<?> type) {
|
||||
return new File(this.sourceFolder, sourcePathFor(type));
|
||||
}
|
||||
|
||||
public ConfigurationMetadata fullBuild() {
|
||||
|
@ -120,6 +121,8 @@ public class TestProject {
|
|||
|
||||
/**
|
||||
* Retrieve File relative to project's output folder.
|
||||
* @param relativePath the relative path
|
||||
* @return the output file
|
||||
*/
|
||||
public File getOutputFile(String relativePath) {
|
||||
Assert.assertFalse(new File(relativePath).isAbsolute());
|
||||
|
@ -128,6 +131,9 @@ public class TestProject {
|
|||
|
||||
/**
|
||||
* Add source code at the end of file, just before last '}'
|
||||
* @param target the target
|
||||
* @param snippetStream the snippet stream
|
||||
* @throws Exception if the source cannot be added
|
||||
*/
|
||||
public void addSourceCode(Class<?> target, InputStream snippetStream)
|
||||
throws Exception {
|
||||
|
@ -143,31 +149,36 @@ public class TestProject {
|
|||
|
||||
/**
|
||||
* Delete source file for given class from project.
|
||||
* @param type the class to delete
|
||||
*/
|
||||
public void delete(Class<?> klass) {
|
||||
File target = getSourceFile(klass);
|
||||
public void delete(Class<?> type) {
|
||||
File target = getSourceFile(type);
|
||||
target.delete();
|
||||
this.sourceFiles.remove(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore source code of given class to its original contents.
|
||||
* @param type the class to revert
|
||||
* @throws IOException
|
||||
*/
|
||||
public void revert(Class<?> klass) throws IOException {
|
||||
Assert.assertTrue(getSourceFile(klass).exists());
|
||||
copySources(klass);
|
||||
public void revert(Class<?> type) throws IOException {
|
||||
Assert.assertTrue(getSourceFile(type).exists());
|
||||
copySources(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add source code of given class to this project.
|
||||
* @param type the class to add
|
||||
* @throws IOException
|
||||
*/
|
||||
public void add(Class<?> klass) throws IOException {
|
||||
Assert.assertFalse(getSourceFile(klass).exists());
|
||||
copySources(klass);
|
||||
public void add(Class<?> type) throws IOException {
|
||||
Assert.assertFalse(getSourceFile(type).exists());
|
||||
copySources(type);
|
||||
}
|
||||
|
||||
public void replaceText(Class<?> klass, String find, String replace) throws Exception {
|
||||
File target = getSourceFile(klass);
|
||||
public void replaceText(Class<?> type, String find, String replace) throws Exception {
|
||||
File target = getSourceFile(type);
|
||||
String contents = getContents(target);
|
||||
contents = contents.replace(find, replace);
|
||||
putContents(target, contents);
|
||||
|
@ -178,8 +189,8 @@ public class TestProject {
|
|||
* have no need to know about these. They should work only with the copied source
|
||||
* code.
|
||||
*/
|
||||
private File getOriginalSourceFile(Class<?> klass) {
|
||||
return new File(ORIGINAL_SOURCE_FOLDER, sourcePathFor(klass));
|
||||
private File getOriginalSourceFile(Class<?> type) {
|
||||
return new File(ORIGINAL_SOURCE_FOLDER, sourcePathFor(type));
|
||||
}
|
||||
|
||||
private static void putContents(File targetFile, String contents)
|
||||
|
|
|
@ -66,6 +66,7 @@ public final class Dependency {
|
|||
|
||||
/**
|
||||
* Return the dependency group id.
|
||||
* @return the group ID
|
||||
*/
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
|
@ -73,6 +74,7 @@ public final class Dependency {
|
|||
|
||||
/**
|
||||
* Return the dependency artifact id.
|
||||
* @return the artifact ID
|
||||
*/
|
||||
public String getArtifactId() {
|
||||
return this.artifactId;
|
||||
|
@ -80,6 +82,7 @@ public final class Dependency {
|
|||
|
||||
/**
|
||||
* Return the dependency version.
|
||||
* @return the version
|
||||
*/
|
||||
public String getVersion() {
|
||||
return this.version;
|
||||
|
@ -87,6 +90,7 @@ public final class Dependency {
|
|||
|
||||
/**
|
||||
* Return the dependency exclusions.
|
||||
* @return the exclusions
|
||||
*/
|
||||
public List<Exclusion> getExclusions() {
|
||||
return this.exclusions;
|
||||
|
@ -145,14 +149,16 @@ public final class Dependency {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the exclusion artifact id.
|
||||
* Return the exclusion artifact ID.
|
||||
* @return the exclusion artifact ID
|
||||
*/
|
||||
public String getArtifactId() {
|
||||
return this.artifactId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the exclusion group id.
|
||||
* Return the exclusion group ID.
|
||||
* @return the exclusion group ID
|
||||
*/
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
|
|
|
@ -41,6 +41,7 @@ public abstract class ManagedDependencies implements Dependencies {
|
|||
|
||||
/**
|
||||
* Return the 'spring-boot-dependencies' POM version.
|
||||
* @return the version
|
||||
* @deprecated since 1.1.0 in favor of {@link #getSpringBootVersion()}
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -50,6 +51,7 @@ public abstract class ManagedDependencies implements Dependencies {
|
|||
|
||||
/**
|
||||
* Return the 'spring-boot-dependencies' POM version.
|
||||
* @return the spring boot version
|
||||
*/
|
||||
public String getSpringBootVersion() {
|
||||
Dependency dependency = find("org.springframework.boot", "spring-boot");
|
||||
|
|
|
@ -41,11 +41,13 @@ public interface Layout {
|
|||
|
||||
/**
|
||||
* Returns the location of classes within the archive.
|
||||
* @return the classes location
|
||||
*/
|
||||
String getClassesLocation();
|
||||
|
||||
/**
|
||||
* Returns if loader classes should be included to make the archive executable.
|
||||
* @return if the layout is executable
|
||||
*/
|
||||
boolean isExecutable();
|
||||
|
||||
|
|
|
@ -192,6 +192,7 @@ public abstract class MainClassFinder {
|
|||
* Perform the given callback operation on all main classes from the given jar.
|
||||
* @param jarFile the jar file to search
|
||||
* @param classesLocation the location within the jar containing classes
|
||||
* @param callback the callback
|
||||
* @return the first callback result or {@code null}
|
||||
* @throws IOException
|
||||
*/
|
||||
|
@ -310,6 +311,7 @@ public abstract class MainClassFinder {
|
|||
|
||||
/**
|
||||
* Callback interface used to receive class names.
|
||||
* @param <T> the result type
|
||||
*/
|
||||
public static interface ClassNameCallback<T> {
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ public interface JavaAgentDetector {
|
|||
* Returns {@code true} if {@code url} points to a Java agent jar file, otherwise
|
||||
* {@code false} is returned.
|
||||
* @param url The url to examine
|
||||
* @return if the URL points to a Java agent
|
||||
*/
|
||||
public boolean isJavaAgentJar(URL url);
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ class CentralDirectoryEndRecord {
|
|||
|
||||
/**
|
||||
* Return the number of ZIP entries in the file.
|
||||
* @return the number of records in the zip
|
||||
*/
|
||||
public int getNumberOfRecords() {
|
||||
return (int) Bytes.littleEndianValue(this.block, this.offset + 10, 2);
|
||||
|
|
|
@ -44,6 +44,7 @@ public class JarEntry extends java.util.jar.JarEntry {
|
|||
|
||||
/**
|
||||
* Return the source {@link JarEntryData} that was used to create this entry.
|
||||
* @return the source of the entry
|
||||
*/
|
||||
public JarEntryData getSource() {
|
||||
return this.source;
|
||||
|
@ -51,6 +52,8 @@ public class JarEntry extends java.util.jar.JarEntry {
|
|||
|
||||
/**
|
||||
* Return a {@link URL} for this {@link JarEntry}.
|
||||
* @return the URL for the entry
|
||||
* @throws MalformedURLException if the URL is not valid
|
||||
*/
|
||||
public URL getUrl() throws MalformedURLException {
|
||||
return new URL(this.source.getSource().getUrl(), getName());
|
||||
|
|
|
@ -170,6 +170,7 @@ public abstract class SystemPropertyUtils {
|
|||
* provided key. Environment variables in <code>UPPER_CASE</code> style are allowed
|
||||
* where System properties would normally be <code>lower.case</code>.
|
||||
* @param key the key to resolve
|
||||
* @param defaultValue the default value
|
||||
* @param text optional extra context for an error message if the key resolution fails
|
||||
* (e.g. if System properties are not accessible)
|
||||
* @return a static property value or null of not found
|
||||
|
|
|
@ -74,6 +74,7 @@ public class ApplicationPid {
|
|||
|
||||
/**
|
||||
* Write the PID to the specified file.
|
||||
* @param file the PID file
|
||||
* @throws IllegalStateException if no PID is available.
|
||||
* @throws IOException if the file cannot be written
|
||||
*/
|
||||
|
|
|
@ -467,6 +467,7 @@ public class SpringApplication {
|
|||
* content from the Environment (banner.location and banner.charset). The defaults are
|
||||
* banner.location=classpath:banner.txt, banner.charset=UTF-8. If the banner file does
|
||||
* not exist or cannot be printed, a simple default is created.
|
||||
* @param environment the environment
|
||||
* @see #setShowBanner(boolean)
|
||||
* @see #printBanner()
|
||||
*/
|
||||
|
@ -741,6 +742,7 @@ public class SpringApplication {
|
|||
* Sets if the created {@link ApplicationContext} should have a shutdown hook
|
||||
* registered. Defaults to {@code true} to ensure that JVM shutdowns are handled
|
||||
* gracefully.
|
||||
* @param registerShutdownHook if the shutdown hook should be registered
|
||||
*/
|
||||
public void setRegisterShutdownHook(boolean registerShutdownHook) {
|
||||
this.registerShutdownHook = registerShutdownHook;
|
||||
|
@ -966,6 +968,7 @@ public class SpringApplication {
|
|||
* Most developers will want to define their own main method can call the
|
||||
* {@link #run(Object, String...) run} method instead.
|
||||
* @param args command line arguments
|
||||
* @throws Exception if the application cannot be started
|
||||
* @see SpringApplication#run(Object[], String[])
|
||||
* @see SpringApplication#run(Object, String...)
|
||||
*/
|
||||
|
|
|
@ -45,6 +45,7 @@ import org.springframework.validation.Validator;
|
|||
* them to an object of a specified type and then optionally running a {@link Validator}
|
||||
* over it.
|
||||
*
|
||||
* @param <T> The target type
|
||||
* @author Dave Syer
|
||||
*/
|
||||
public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
|
||||
|
@ -87,6 +88,7 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
|
|||
|
||||
/**
|
||||
* Create a new factory for an object of the given type.
|
||||
* @param type the target type
|
||||
* @see #PropertiesConfigurationFactory(Class)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.yaml.snakeyaml.error.YAMLException;
|
|||
* Validate some YAML by binding it to an object of a specified type and then optionally
|
||||
* running a {@link Validator} over it.
|
||||
*
|
||||
* @param <T> the configuration type
|
||||
* @author Luke Taylor
|
||||
* @author Dave Syer
|
||||
*/
|
||||
|
|
|
@ -72,6 +72,8 @@ public class ParentContextCloserApplicationListener implements
|
|||
/**
|
||||
* Subclasses may override to create their own subclass of ContextCloserListener. This
|
||||
* still enforces the use of a weak reference.
|
||||
* @param child the child context
|
||||
* @return the {@link ContextCloserListener} to use
|
||||
*/
|
||||
protected ContextCloserListener createContextCloserListener(
|
||||
ConfigurableApplicationContext child) {
|
||||
|
|
|
@ -299,6 +299,7 @@ public class SpringApplicationBuilder {
|
|||
* Sets the {@link Banner} instance which will be used to print the banner when no
|
||||
* static banner file is provided.
|
||||
* @param banner The banner to use
|
||||
* @return the current builder
|
||||
*/
|
||||
public SpringApplicationBuilder banner(Banner banner) {
|
||||
this.application.setBanner(banner);
|
||||
|
@ -329,6 +330,8 @@ public class SpringApplicationBuilder {
|
|||
/**
|
||||
* Sets if the created {@link ApplicationContext} should have a shutdown hook
|
||||
* registered.
|
||||
* @param registerShutdownHook if the shutdown hook should be registered
|
||||
* @return the current builder
|
||||
*/
|
||||
public SpringApplicationBuilder registerShutdownHook(boolean registerShutdownHook) {
|
||||
this.registerShutdownHookApplied = true;
|
||||
|
|
|
@ -164,6 +164,7 @@ public class ConfigFileApplicationListener implements
|
|||
/**
|
||||
* Add config file property sources to the specified environment.
|
||||
* @param environment the environment to add source to
|
||||
* @param resourceLoader the resource loader
|
||||
* @see #addPostProcessors(ConfigurableApplicationContext)
|
||||
*/
|
||||
protected void addPropertySources(ConfigurableEnvironment environment,
|
||||
|
@ -222,6 +223,7 @@ public class ConfigFileApplicationListener implements
|
|||
* profiles (if any) plus file extensions supported by the properties loaders.
|
||||
* Locations are considered in the order specified, with later items taking precedence
|
||||
* (like a map merge).
|
||||
* @param locations the search locations
|
||||
*/
|
||||
public void setSearchLocations(String locations) {
|
||||
Assert.hasLength(locations, "Locations must not be empty");
|
||||
|
@ -231,6 +233,7 @@ public class ConfigFileApplicationListener implements
|
|||
/**
|
||||
* Sets the names of the files that should be loaded (excluding file extension) as a
|
||||
* comma-separated list.
|
||||
* @param names the names to load
|
||||
*/
|
||||
public void setSearchNames(String names) {
|
||||
Assert.hasLength(names, "Names must not be empty");
|
||||
|
|
|
@ -114,6 +114,7 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
|
|||
/**
|
||||
* Returns the context path for the embedded servlet container. The path will start
|
||||
* with "/" and not end with "/". The root context is represented by an empty string.
|
||||
* @return the context path
|
||||
*/
|
||||
public String getContextPath() {
|
||||
return this.contextPath;
|
||||
|
@ -182,6 +183,7 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
|
|||
/**
|
||||
* Returns the document root which will be used by the web context to serve static
|
||||
* files.
|
||||
* @return the document root
|
||||
*/
|
||||
public File getDocumentRoot() {
|
||||
return this.documentRoot;
|
||||
|
@ -200,8 +202,9 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a mutable set of {@link ErrorPage}s that will be used when handling
|
||||
* exceptions.
|
||||
* Returns a mutable set of {@link ErrorPage ErrorPages} that will be used when
|
||||
* handling exceptions.
|
||||
* @return the error pages
|
||||
*/
|
||||
public Set<ErrorPage> getErrorPages() {
|
||||
return this.errorPages;
|
||||
|
|
|
@ -57,6 +57,7 @@ public abstract class AbstractEmbeddedServletContainerFactory extends
|
|||
/**
|
||||
* Returns the absolute document root when it points to a valid folder, logging a
|
||||
* warning and returning {@code null} otherwise.
|
||||
* @return the valid document root
|
||||
*/
|
||||
protected final File getValidDocumentRoot() {
|
||||
File file = getDocumentRoot();
|
||||
|
|
|
@ -115,6 +115,7 @@ public class AnnotationConfigEmbeddedWebApplicationContext extends
|
|||
* <p>
|
||||
* Any call to this method must occur prior to calls to {@link #register(Class...)}
|
||||
* and/or {@link #scan(String...)}.
|
||||
* @param beanNameGenerator the bean name generator
|
||||
* @see AnnotatedBeanDefinitionReader#setBeanNameGenerator
|
||||
* @see ClassPathBeanDefinitionScanner#setBeanNameGenerator
|
||||
*/
|
||||
|
@ -133,6 +134,7 @@ public class AnnotationConfigEmbeddedWebApplicationContext extends
|
|||
* <p>
|
||||
* Any call to this method must occur prior to calls to {@link #register(Class...)}
|
||||
* and/or {@link #scan(String...)}.
|
||||
* @param scopeMetadataResolver the scope metadata resolver
|
||||
*/
|
||||
public void setScopeMetadataResolver(ScopeMetadataResolver scopeMetadataResolver) {
|
||||
this.reader.setScopeMetadataResolver(scopeMetadataResolver);
|
||||
|
|
|
@ -228,6 +228,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
|
|||
* Servlet context. By default this method will first attempt to find
|
||||
* {@link ServletContextInitializer}, {@link Servlet}, {@link Filter} and certain
|
||||
* {@link EventListener} beans.
|
||||
* @return the servlet initializer beans
|
||||
*/
|
||||
protected Collection<ServletContextInitializer> getServletContextInitializerBeans() {
|
||||
return new ServletContextInitializerBeans(getBeanFactory());
|
||||
|
@ -331,6 +332,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
|
|||
/**
|
||||
* Returns the {@link EmbeddedServletContainer} that was created by the context or
|
||||
* {@code null} if the container has not yet been created.
|
||||
* @return the embedded servlet container
|
||||
*/
|
||||
public EmbeddedServletContainer getEmbeddedServletContainer() {
|
||||
return this.embeddedServletContainer;
|
||||
|
|
|
@ -97,6 +97,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
|
||||
/**
|
||||
* Returns the filter being registered.
|
||||
* @return the filter
|
||||
*/
|
||||
protected Filter getFilter() {
|
||||
return this.filter;
|
||||
|
@ -104,6 +105,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
|
||||
/**
|
||||
* Set the filter to be registered.
|
||||
* @param filter the filter
|
||||
*/
|
||||
public void setFilter(Filter filter) {
|
||||
Assert.notNull(filter, "Filter must not be null");
|
||||
|
@ -208,6 +210,8 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
/**
|
||||
* Convenience method to {@link #setDispatcherTypes(EnumSet) set dispatcher types}
|
||||
* using the specified elements.
|
||||
* @param first the first dispatcher type
|
||||
* @param rest additional dispatcher types
|
||||
*/
|
||||
public void setDispatcherTypes(DispatcherType first, DispatcherType... rest) {
|
||||
this.dispatcherTypes = EnumSet.of(first, rest);
|
||||
|
@ -217,6 +221,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
* Sets the dispatcher types that should be used with the registration. If not
|
||||
* specified the types will be deduced based on the value of
|
||||
* {@link #isAsyncSupported()}.
|
||||
* @param dispatcherTypes the dispatcher types
|
||||
*/
|
||||
public void setDispatcherTypes(EnumSet<DispatcherType> dispatcherTypes) {
|
||||
this.dispatcherTypes = dispatcherTypes;
|
||||
|
@ -226,6 +231,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
* Set if the filter mappings should be matched after any declared filter mappings of
|
||||
* the ServletContext. Defaults to {@code false} indicating the filters are supposed
|
||||
* to be matched before any declared filter mappings of the ServletContext.
|
||||
* @param matchAfter if filter mappings are matched after
|
||||
*/
|
||||
public void setMatchAfter(boolean matchAfter) {
|
||||
this.matchAfter = matchAfter;
|
||||
|
@ -234,6 +240,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
/**
|
||||
* Return if filter mappings should be matched after any declared Filter mappings of
|
||||
* the ServletContext.
|
||||
* @return if filter mappings are matched after
|
||||
*/
|
||||
public boolean isMatchAfter() {
|
||||
return this.matchAfter;
|
||||
|
@ -259,6 +266,7 @@ public class FilterRegistrationBean extends RegistrationBean {
|
|||
/**
|
||||
* Configure registration settings. Subclasses can override this method to perform
|
||||
* additional configuration if required.
|
||||
* @param registration the registration
|
||||
*/
|
||||
protected void configure(FilterRegistration.Dynamic registration) {
|
||||
super.configure(registration);
|
||||
|
|
|
@ -44,6 +44,7 @@ public class MultipartConfigFactory {
|
|||
|
||||
/**
|
||||
* Sets the directory location where files will be stored.
|
||||
* @param location the location
|
||||
*/
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
|
@ -51,6 +52,7 @@ public class MultipartConfigFactory {
|
|||
|
||||
/**
|
||||
* Sets the maximum size allowed for uploaded files.
|
||||
* @param maxFileSize the maximum file size
|
||||
* @see #setMaxFileSize(String)
|
||||
*/
|
||||
public void setMaxFileSize(long maxFileSize) {
|
||||
|
@ -60,6 +62,7 @@ public class MultipartConfigFactory {
|
|||
/**
|
||||
* Sets the maximum size allowed for uploaded files. Values can use the suffixed "MB"
|
||||
* or "KB" to indicate a Megabyte or Kilobyte size.
|
||||
* @param maxFileSize the maximum file size
|
||||
* @see #setMaxFileSize(long)
|
||||
*/
|
||||
public void setMaxFileSize(String maxFileSize) {
|
||||
|
@ -68,6 +71,7 @@ public class MultipartConfigFactory {
|
|||
|
||||
/**
|
||||
* Sets the maximum size allowed for multipart/form-data requests.
|
||||
* @param maxRequestSize the maximum request size
|
||||
* @see #setMaxRequestSize(String)
|
||||
*/
|
||||
public void setMaxRequestSize(long maxRequestSize) {
|
||||
|
@ -77,6 +81,7 @@ public class MultipartConfigFactory {
|
|||
/**
|
||||
* Sets the maximum size allowed for multipart/form-data requests. Values can use the
|
||||
* suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size.
|
||||
* @param maxRequestSize the maximum request size
|
||||
* @see #setMaxRequestSize(long)
|
||||
*/
|
||||
public void setMaxRequestSize(String maxRequestSize) {
|
||||
|
@ -85,6 +90,7 @@ public class MultipartConfigFactory {
|
|||
|
||||
/**
|
||||
* Sets the size threshold after which files will be written to disk.
|
||||
* @param fileSizeThreshold the file size threshold
|
||||
* @see #setFileSizeThreshold(String)
|
||||
*/
|
||||
public void setFileSizeThreshold(int fileSizeThreshold) {
|
||||
|
@ -94,6 +100,7 @@ public class MultipartConfigFactory {
|
|||
/**
|
||||
* Sets the size threshold after which files will be written to disk. Values can use
|
||||
* the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size.
|
||||
* @param fileSizeThreshold the file size threshold
|
||||
* @see #setFileSizeThreshold(int)
|
||||
*/
|
||||
public void setFileSizeThreshold(String fileSizeThreshold) {
|
||||
|
@ -114,6 +121,7 @@ public class MultipartConfigFactory {
|
|||
|
||||
/**
|
||||
* Create a new {@link MultipartConfigElement} instance.
|
||||
* @return the multipart config element
|
||||
*/
|
||||
public MultipartConfigElement createMultipartConfig() {
|
||||
return new MultipartConfigElement(this.location, this.maxFileSize,
|
||||
|
|
|
@ -47,6 +47,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
|
||||
/**
|
||||
* Set the name of this registration. If not specified the bean name will be used.
|
||||
* @param name the name of the registration
|
||||
*/
|
||||
public void setName(String name) {
|
||||
Assert.hasLength(name, "Name must not be empty");
|
||||
|
@ -56,6 +57,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
/**
|
||||
* Sets if asynchronous operations are support for this registration. If not specified
|
||||
* defaults to {@code true}.
|
||||
* @param asyncSupported if async is supported
|
||||
*/
|
||||
public void setAsyncSupported(boolean asyncSupported) {
|
||||
this.asyncSupported = asyncSupported;
|
||||
|
@ -63,6 +65,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
|
||||
/**
|
||||
* Returns if asynchronous operations are support for this registration.
|
||||
* @return if async is supported
|
||||
*/
|
||||
public boolean isAsyncSupported() {
|
||||
return this.asyncSupported;
|
||||
|
@ -86,6 +89,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
/**
|
||||
* Set init-parameters for this registration. Calling this method will replace any
|
||||
* existing init-parameters.
|
||||
* @param initParameters the init parameters
|
||||
* @see #getInitParameters
|
||||
* @see #addInitParameter
|
||||
*/
|
||||
|
@ -96,6 +100,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
|
||||
/**
|
||||
* Returns a mutable Map of the registration init-parameters.
|
||||
* @return the init parameters
|
||||
*/
|
||||
public Map<String, String> getInitParameters() {
|
||||
return this.initParameters;
|
||||
|
@ -115,6 +120,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
* Deduces the name for this registration. Will return user specified name or fallback
|
||||
* to convention based naming.
|
||||
* @param value the object used for convention based names
|
||||
* @return the deduced name
|
||||
*/
|
||||
protected final String getOrDeduceName(Object value) {
|
||||
return (this.name != null ? this.name : Conventions.getVariableName(value));
|
||||
|
@ -122,6 +128,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
|
|||
|
||||
/**
|
||||
* Configure registration base settings.
|
||||
* @param registration the registration
|
||||
*/
|
||||
protected void configure(Registration.Dynamic registration) {
|
||||
Assert.state(registration != null,
|
||||
|
|
|
@ -81,6 +81,7 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
|
||||
/**
|
||||
* Returns the servlet being registered.
|
||||
* @return the sevlet
|
||||
*/
|
||||
protected Servlet getServlet() {
|
||||
return this.servlet;
|
||||
|
@ -88,6 +89,7 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
|
||||
/**
|
||||
* Sets the servlet to be registered.
|
||||
* @param servlet the servlet
|
||||
*/
|
||||
public void setServlet(Servlet servlet) {
|
||||
Assert.notNull(servlet, "Servlet must not be null");
|
||||
|
@ -124,8 +126,9 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>loadOnStartup</code> priority. See
|
||||
* Sets the {@code loadOnStartup} priority. See
|
||||
* {@link ServletRegistration.Dynamic#setLoadOnStartup} for details.
|
||||
* @param loadOnStartup if load on startup is enabled
|
||||
*/
|
||||
public void setLoadOnStartup(int loadOnStartup) {
|
||||
this.loadOnStartup = loadOnStartup;
|
||||
|
@ -142,6 +145,7 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
/**
|
||||
* Returns the {@link MultipartConfigElement multi-part configuration} to be applied
|
||||
* or {@code null}.
|
||||
* @return the multipart config
|
||||
*/
|
||||
public MultipartConfigElement getMultipartConfig() {
|
||||
return this.multipartConfig;
|
||||
|
@ -149,6 +153,7 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
|
||||
/**
|
||||
* Returns the servlet name that will be registered.
|
||||
* @return the servlet name
|
||||
*/
|
||||
public String getServletName() {
|
||||
return getOrDeduceName(this.servlet);
|
||||
|
@ -175,6 +180,7 @@ public class ServletRegistrationBean extends RegistrationBean {
|
|||
/**
|
||||
* Configure registration settings. Subclasses can override this method to perform
|
||||
* additional configuration if required.
|
||||
* @param registration the registration
|
||||
*/
|
||||
protected void configure(ServletRegistration.Dynamic registration) {
|
||||
super.configure(registration);
|
||||
|
|
|
@ -83,6 +83,7 @@ public class XmlEmbeddedWebApplicationContext extends EmbeddedWebApplicationCont
|
|||
|
||||
/**
|
||||
* Set whether to use XML validation. Default is {@code true}.
|
||||
* @param validating if validating the XML
|
||||
*/
|
||||
public void setValidating(boolean validating) {
|
||||
this.reader.setValidating(validating);
|
||||
|
|
|
@ -63,6 +63,7 @@ public class JettyEmbeddedServletContainer implements EmbeddedServletContainer {
|
|||
/**
|
||||
* Create a new {@link JettyEmbeddedServletContainer} instance.
|
||||
* @param server the underlying Jetty server
|
||||
* @param autoStart if auto-starting the container
|
||||
*/
|
||||
public JettyEmbeddedServletContainer(Server server, boolean autoStart) {
|
||||
this.autoStart = autoStart;
|
||||
|
@ -196,6 +197,7 @@ public class JettyEmbeddedServletContainer implements EmbeddedServletContainer {
|
|||
|
||||
/**
|
||||
* Returns access to the underlying Jetty Server.
|
||||
* @return the Jetty server
|
||||
*/
|
||||
public Server getServer() {
|
||||
return this.server;
|
||||
|
|
|
@ -262,6 +262,7 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
|
|||
|
||||
/**
|
||||
* Returns access to the underlying Tomcat server.
|
||||
* @return the Tomcat server
|
||||
*/
|
||||
public Tomcat getTomcat() {
|
||||
return this.tomcat;
|
||||
|
|
|
@ -417,6 +417,7 @@ public class TomcatEmbeddedServletContainerFactory extends
|
|||
|
||||
/**
|
||||
* The Tomcat protocol to use when create the {@link Connector}.
|
||||
* @param protocol the protocol
|
||||
* @see Connector#Connector(String)
|
||||
*/
|
||||
public void setProtocol(String protocol) {
|
||||
|
@ -581,6 +582,7 @@ public class TomcatEmbeddedServletContainerFactory extends
|
|||
|
||||
/**
|
||||
* Returns the character encoding to use for URL decoding.
|
||||
* @return the URI encoding
|
||||
*/
|
||||
public String getUriEncoding() {
|
||||
return this.uriEncoding;
|
||||
|
|
|
@ -132,11 +132,12 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
|
|||
* config classes) because other settings have sensible defaults. You might choose
|
||||
* (for instance) to add default command line arguments, or set an active Spring
|
||||
* profile.
|
||||
* @param application a builder for the application context
|
||||
* @param builder a builder for the application context
|
||||
* @return the application builder
|
||||
* @see SpringApplicationBuilder
|
||||
*/
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application;
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
return builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ public interface PropertySourceLoader {
|
|||
|
||||
/**
|
||||
* Returns the file extensions that the loader supports (excluding the '.').
|
||||
* @return the file extensions
|
||||
*/
|
||||
String[] getFileExtensions();
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@ public class PropertySourcesLoader {
|
|||
|
||||
/**
|
||||
* Return the {@link MutablePropertySources} being loaded.
|
||||
* @return the property sources
|
||||
*/
|
||||
public MutablePropertySources getPropertySources() {
|
||||
return this.propertySources;
|
||||
|
@ -197,6 +198,7 @@ public class PropertySourcesLoader {
|
|||
|
||||
/**
|
||||
* Returns all file extensions that could be loaded.
|
||||
* @return the file extensions
|
||||
*/
|
||||
public Set<String> getAllFileExtensions() {
|
||||
Set<String> fileExtensions = new HashSet<String>();
|
||||
|
|
|
@ -34,6 +34,7 @@ public interface XAConnectionFactoryWrapper {
|
|||
* {@link TransactionManager}.
|
||||
* @param connectionFactory the connection factory to wrap
|
||||
* @return the wrapped connection factory
|
||||
* @throws Exception if the connection factory cannot be wrapped
|
||||
*/
|
||||
ConnectionFactory wrapConnectionFactory(XAConnectionFactory connectionFactory)
|
||||
throws Exception;
|
||||
|
|
|
@ -34,6 +34,7 @@ public interface XADataSourceWrapper {
|
|||
* {@link TransactionManager}.
|
||||
* @param dataSource the data source to wrap
|
||||
* @return the wrapped data source
|
||||
* @throws Exception if the data source cannot be wrapped
|
||||
*/
|
||||
DataSource wrapDataSource(XADataSource dataSource) throws Exception;
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
|
|||
* Return any self initialization config that has been applied. By default this method
|
||||
* checks {@link #getStandardConfigLocations()} and assumes that any file that exists
|
||||
* will have been applied.
|
||||
* @return the self initialization config
|
||||
*/
|
||||
protected String getSelfInitializationConfig() {
|
||||
for (String location : getStandardConfigLocations()) {
|
||||
|
@ -79,6 +80,7 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
|
|||
|
||||
/**
|
||||
* Return the standard config locations for this system.
|
||||
* @return the standard config locations
|
||||
* @see #getSelfInitializationConfig()
|
||||
*/
|
||||
protected abstract String[] getStandardConfigLocations();
|
||||
|
|
|
@ -80,6 +80,7 @@ public class LogFile {
|
|||
|
||||
/**
|
||||
* Apply log file details to {@code LOG_PATH} and {@code LOG_FILE} map entries.
|
||||
* @param properties the properties to apply to
|
||||
*/
|
||||
public void applyTo(Properties properties) {
|
||||
put(properties, "LOG_PATH", this.path);
|
||||
|
|
|
@ -170,6 +170,8 @@ public class LoggingApplicationListener implements SmartApplicationListener {
|
|||
/**
|
||||
* Initialize the logging system according to preferences expressed through the
|
||||
* {@link Environment} and the classpath.
|
||||
* @param environment the environment
|
||||
* @param classLoader the classloader
|
||||
*/
|
||||
protected void initialize(ConfigurableEnvironment environment, ClassLoader classLoader) {
|
||||
if (System.getProperty(PID_KEY) == null) {
|
||||
|
|
|
@ -84,6 +84,7 @@ public abstract class LoggingSystem {
|
|||
/**
|
||||
* Detect and return the logging system in use. Supports Logback, Log4J, Log4J2 and
|
||||
* Java Logging.
|
||||
* @param classLoader the classloader
|
||||
* @return The logging system
|
||||
*/
|
||||
public static LoggingSystem get(ClassLoader classLoader) {
|
||||
|
|
Loading…
Reference in New Issue