diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java index 8d5ecbca24..dc62c11f9e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java @@ -30,11 +30,20 @@ import org.springframework.util.StringUtils; @ConfigurationProperties(prefix = "endpoints.jmx") public class EndpointMBeanExportProperties { + /** + * JMX domain name. Initialized with the value of 'spring.jmx.default-domain' if set. + */ @Value("${spring.jmx.default_domain:}") private String domain; + /** + * Ensure that ObjectNames are modified in case of conflict. + */ private boolean uniqueNames = false; + /** + * Enable the JMX endpoints. + */ private boolean enabled = true; private Properties staticNames = new Properties(); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationProperties.java index 31e73510eb..7d5c1d0b21 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationProperties.java @@ -29,6 +29,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties("management.health.status") public class HealthIndicatorAutoConfigurationProperties { + /** + * Comma-separated list of health statuses in order of severity. + */ private List order = null; public List getOrder() { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java index b049ea68f8..3716189128 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java @@ -32,6 +32,10 @@ import org.springframework.http.HttpStatus; @ConfigurationProperties(prefix = "endpoints.health") public class HealthMvcEndpointProperties { + /** + * Mapping of health statuses to HttpStatus codes. By default, registered + * health statuses map to sensible defaults (i.e. UP maps to 200). + */ private Map mapping = new HashMap(); public Map getMapping() { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java index 4420855d41..61e0e92683 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java @@ -30,6 +30,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "jolokia") public class JolokiaProperties { + /** + * Jolokia settings. These are traditionally set using servlet parameters, refer + * to the documentation of Jolokia for more details. + */ private Map config = new HashMap(); public Map getConfig() { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java index 60aadbb874..5d6cb80266 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java @@ -53,13 +53,25 @@ public class ManagementServerProperties implements SecurityPrequisite { */ public static final int ACCESS_OVERRIDE_ORDER = ManagementServerProperties.BASIC_AUTH_ORDER - 1; + /** + * Management endpoint HTTP port. Use the same port as the applicationby default. + */ private Integer port; + /** + * Network address that the management endpoints should bind to. + */ private InetAddress address; + /** + * Management endpoint context-path. + */ @NotNull private String contextPath = ""; + /** + * Add the "X-Application-Context" HTTP header in each response. + */ private boolean addApplicationContextHeader = true; private final Security security = maybeCreateSecurity(); @@ -114,10 +126,19 @@ public class ManagementServerProperties implements SecurityPrequisite { */ public static class Security { + /** + * Enable security. + */ private boolean enabled = true; + /** + * Role required to access the management endpoint. + */ private String role = "ADMIN"; + /** + * Session creating policy to use (always, never, if_required, stateless). + */ private SessionCreationPolicy sessions = SessionCreationPolicy.STATELESS; public SessionCreationPolicy getSessions() { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java index 4f29dda4fa..7651a0890e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java @@ -41,6 +41,11 @@ public class ShellProperties { private static Log logger = LogFactory.getLog(ShellProperties.class); + /** + * Authentication type (can be "simple", "spring", "key" or "jaas"). Auto-detected + * according to the environment (i.e. if Spring Security is available, "spring" is used by + * default). + */ private String auth = "simple"; private boolean defaultAuth = true; @@ -48,15 +53,31 @@ public class ShellProperties { @Autowired(required = false) private CrshShellProperties[] additionalProperties = new CrshShellProperties[] { new SimpleAuthenticationProperties() }; + /** + * Scan for changes and update the command if necessary (in seconds). + */ private int commandRefreshInterval = -1; + /** + * Patterns to use to look for commands. + */ private String[] commandPathPatterns = new String[] { "classpath*:/commands/**", "classpath*:/crash/commands/**" }; + /** + * Patterns to use to look for configurations. + */ private String[] configPathPatterns = new String[] { "classpath*:/crash/*" }; + /** + * Comma-separated list of commands to disable. + */ private String[] disabledCommands = new String[] { "jpa*", "jdbc*", "jndi*" }; + /** + * Comma-separated list of plugins to disable. Certain plugins are disabled + * by default based on the environment. + */ private String[] disabledPlugins = new String[0]; private final Ssh ssh = new Ssh(); @@ -207,10 +228,19 @@ public class ShellProperties { */ public static class Ssh extends CrshShellProperties { + /** + * Enable CRaSH SSH support. + */ private boolean enabled = true; + /** + * Path to the SSH server key. + */ private String keyPath; + /** + * SSH port. + */ private String port = "2000"; @Override @@ -256,9 +286,15 @@ public class ShellProperties { */ public static class Telnet extends CrshShellProperties { + /** + * Enable CRaSH telnet support. Enabled by default if the TelnetPlugin is available. + */ private boolean enabled = ClassUtils.isPresent("org.crsh.telnet.TelnetPlugin", ClassUtils.getDefaultClassLoader()); + /** + * Telnet port. + */ private String port = "5000"; @Override @@ -294,6 +330,9 @@ public class ShellProperties { public static class JaasAuthenticationProperties extends CrshShellAuthenticationProperties { + /** + * JAAS domain. + */ private String domain = "my-domain"; @Override @@ -320,6 +359,9 @@ public class ShellProperties { public static class KeyAuthenticationProperties extends CrshShellAuthenticationProperties { + /** + * Path to the authentication key. This should point to a valid ".pem" file. + */ private String path; @Override @@ -374,8 +416,14 @@ public class ShellProperties { public static class User { + /** + * Login user. + */ private String name = "user"; + /** + * Login password. + */ private String password = UUID.randomUUID().toString(); private boolean defaultPassword = true; @@ -417,6 +465,9 @@ public class ShellProperties { public static class SpringAuthenticationProperties extends CrshShellAuthenticationProperties { + /** + * Comma-separated list of required roles to login to the CRaSH console. + */ private String[] roles = new String[] { "ADMIN" }; @Override diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java index 06c5be882b..017da99473 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java @@ -27,12 +27,22 @@ import javax.validation.constraints.Pattern; */ public abstract class AbstractEndpoint implements Endpoint { + /** + * Endpoint identifier. With HTTP monitoring the identifier + * of the endpoint is mapped to a URL (e.g. 'foo' is mapped to '/foo'). + */ @NotNull @Pattern(regexp = "\\w+", message = "ID must only contains letters, numbers and '_'") private String id; + /** + * Enable security on the endpoint. + */ private boolean sensitive; + /** + * Enable the endpoint. + */ private boolean enabled = true; public AbstractEndpoint(String id) { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/HealthEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/HealthEndpoint.java index 7ddc28c653..fbd22cf013 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/HealthEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/HealthEndpoint.java @@ -37,6 +37,9 @@ public class HealthEndpoint extends AbstractEndpoint { private final HealthIndicator healthIndicator; + /** + * Time to live for cached result, in milliseconds. + */ private long timeToLive = 1000; /** diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java index a0288d331d..fd0deed86d 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java @@ -38,7 +38,7 @@ class Sanitizer { } /** - * Set the keys that should be sanitize. Keys can be simple strings that the property + * Keys that should be sanitized. Keys can be simple strings that the property * ends with or regex expressions. * @param keysToSanitize the keys to sanitize */ diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java index 359a815e7a..0a48da1901 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java @@ -47,12 +47,21 @@ import org.springframework.web.util.UrlPathHelper; public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean, ApplicationContextAware, ServletContextAware { + /** + * Endpoint URL path. + */ @NotNull @Pattern(regexp = "/[^/]*", message = "Path must start with /") private String path; + /** + * Enable security on the endpoint. + */ private boolean sensitive; + /** + * Enable the endpoint. + */ private boolean enabled = true; private final ServletWrappingController controller = new ServletWrappingController(); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/DiskSpaceHealthIndicatorProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/DiskSpaceHealthIndicatorProperties.java index 514c7bbd70..f53e4b737d 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/DiskSpaceHealthIndicatorProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/DiskSpaceHealthIndicatorProperties.java @@ -34,8 +34,14 @@ public class DiskSpaceHealthIndicatorProperties { private static final int DEFAULT_THRESHOLD = 10 * MEGABYTES; + /** + * Path used to compute the available disk space. + */ private File path = new File("."); + /** + * Minimum disk space that should be available, in bytes. + */ private long threshold = DEFAULT_THRESHOLD; public File getPath() { diff --git a/spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 7d83354aa0..0cffc17587 100644 --- a/spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -3,13 +3,13 @@ "name": "endpoints.configprops.keys-to-sanitize", "type": "java.lang.String", "sourceType": "org.springframework.boot.actuate.endpoint.ConfigurationPropertiesReportEndpoint", - "description": "The keys that should be sanitize. Keys can be simple strings that the property ends with or regex expressions." + "description": "Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions." }, { "name": "endpoints.env.keys-to-sanitize", "type": "java.lang.String", "sourceType": "org.springframework.boot.actuate.endpoint.EnvironmentEndpoint", - "description": "The keys that should be sanitize. Keys can be simple strings that the property ends with or regex expressions." + "description": "Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions." }, { "name": "info", @@ -60,7 +60,7 @@ { "name": "spring.pidfile", "type": "java.lang.String", - "description": "The location of the PID file to write (if ApplicationPidFileWriter is used).", + "description": "Location of the PID file to write (if ApplicationPidFileWriter is used).", "sourceType": "org.springframework.boot.actuate.system.ApplicationPidFileWriter" } ]} diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java index 9bf48b90d0..81085f2ce3 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java @@ -59,10 +59,22 @@ public class MessageSourceAutoConfiguration { private static final Resource[] NO_RESOURCES = {}; + /** + * Comma-separated list of basenames, each following the ResourceBundle convention. Essentially + * a fully-qualified classpath location. If it doesn't contain a package qualifier (such as + * "org.mypackage"), it will be resolved from the classpath root. + */ private String basename = "messages"; + /** + * Message bundles encoding. + */ private String encoding = "utf-8"; + /** + * Loaded resource bundle files cache expiration, in seconds. When set to + * -1, bundles are cached forever. + */ private int cacheSeconds = -1; @Bean diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java index 19582f5648..a23bd30c55 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java @@ -31,16 +31,34 @@ import org.springframework.util.StringUtils; @ConfigurationProperties(prefix = "spring.rabbitmq") public class RabbitProperties { + /** + * RabbitMQ host. + */ private String host = "localhost"; + /** + * RabbitMQ port. + */ private int port = 5672; + /** + * Login user to authenticate to the broker. + */ private String username; + /** + * Login to authenticate against the broker. + */ private String password; + /** + * Virtual host to use when connecting to the broker. + */ private String virtualHost; + /** + * Comma-separated list of addresses to which the client should connect to. + */ private String addresses; private boolean dynamic = true; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java index 76198f216e..65f8aa7054 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java @@ -30,6 +30,9 @@ public class BatchProperties { private static final String DEFAULT_SCHEMA_LOCATION = "classpath:org/springframework/" + "batch/core/schema-@@platform@@.sql"; + /** + * Path to the SQL file to use to initialize the database schema. + */ private String schema = DEFAULT_SCHEMA_LOCATION; private final Initializer initializer = new Initializer(); @@ -54,6 +57,9 @@ public class BatchProperties { public static class Initializer { + /** + * Create the required batch tables on startup if necessary. + */ private boolean enabled = true; public boolean isEnabled() { @@ -68,6 +74,10 @@ public class BatchProperties { public static class Job { + /** + * Comma-separated list of job names to execute on startup. By default, all Jobs + * found in the context are executed. + */ private String names = ""; public String getNames() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java index 45686af5ef..7e27b5cce2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java @@ -28,8 +28,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.data.elasticsearch") public class ElasticsearchProperties { + /** + * Elasticsearch cluster name. + */ private String clusterName = "elasticsearch"; + /** + * Comma-separated list of cluster node addresses. If not specified, starts a client node. + */ private String clusterNodes; public String getClusterName() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index 77d8f21237..fd5170a653 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -35,18 +35,40 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "flyway", ignoreUnknownFields = true) public class FlywayProperties { + /** + * Locations of migrations scripts. + */ private List locations = Arrays.asList("db/migration"); + /** + * Check that migration scripts location exists. + */ private boolean checkLocation = false; + /** + * Enable flyway. + */ private boolean enabled = true; + /** + * Login user of the database to migrate. + */ private String user; + /** + *Login password of the database to migrate. + */ private String password; + /** + * JDBC url of the database to migrate. If not set, the primary configured + * data source is used. + */ private String url; + /** + * SQL statements to execute to initialize a connection immediately after obtaining it. + */ private List initSqls = Collections.emptyList(); public void setLocations(List locations) { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java index 2df1a1b65a..91eedcd364 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java @@ -38,8 +38,14 @@ public class FreeMarkerProperties extends AbstractTemplateViewResolverProperties public static final String DEFAULT_SUFFIX = ".ftl"; + /** + * Well-known FreeMarker keys which will be passed to FreeMarker's Configuration. + */ private Map settings = new HashMap(); + /** + * Comma-separated list of template paths. + */ private String[] templateLoaderPath = new String[] { DEFAULT_TEMPLATE_LOADER_PATH }; public FreeMarkerProperties() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java index e90ba3eed8..e59d2ee99a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java @@ -35,10 +35,19 @@ public class GroovyTemplateProperties extends AbstractViewResolverProperties { public static final String DEFAULT_SUFFIX = ".tpl"; + /** + * Prefix that gets prepended to view names when building a URL. + */ private String prefix = DEFAULT_PREFIX; + /** + *Suffix that gets appended to view names when building a URL. + */ private String suffix = DEFAULT_SUFFIX; + /** + * Configuration to pass to TemplateConfiguration. + */ private Map configuration = new HashMap(); public String getPrefix() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java index b216928097..a284773a63 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java @@ -37,18 +37,40 @@ import com.fasterxml.jackson.databind.SerializationFeature; @ConfigurationProperties(prefix = "spring.jackson") public class JacksonProperties { + /** + * Date format string (yyyy-MM-dd HH:mm:ss), or a fully-qualified date format class name. + */ private String dateFormat; + /** + * One of the constants on Jackson's PropertyNamingStrategy (CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES). + * Can also be a fully-qualified class name of a PropertyNamingStrategy subclass. + */ private String propertyNamingStrategy; + /** + * Jackson on/off features that affect the way Java objects are serialized. + */ private Map serialization = new HashMap(); + /** + * Jackson on/off features that affect the way Java objects are deserialized. + */ private Map deserialization = new HashMap(); + /** + * Jackson general purpose on/off features. + */ private Map mapper = new HashMap(); + /** + * Jackson on/off features for parsers. + */ private Map parser = new HashMap(); + /** + * Jackson on/off features for generators. + */ private Map generator = new HashMap(); public String getDateFormat() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java index 1a752d4210..1e7b97ba5d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java @@ -39,30 +39,66 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB public static final String PREFIX = "spring.datasource"; + /** + * Fully qualified name of the JDBC driver. Auto-detected based on the URL by default. + */ private String driverClassName; + /** + * JDBC url of the database. + */ private String url; + /** + * Login user of the database. + */ private String username; + /** + * Login password of the database. + */ private String password; private ClassLoader classLoader; + /** + * JNDI location of the datasource. Class, url, username & password are ignored when set. + */ private String jndiName; + /** + * Populate the database using 'data.sql'. + */ private boolean initialize = true; + /** + * Platform to use in the schema resource (schema-${platform}.sql). + */ private String platform = "all"; + /** + * Schema (DDL) script resource reference. + */ private String schema; + /** + * Data (DML) script resource reference. + */ private String data; + /** + * Do not stop if an error occurs while initializing the database. + */ private boolean continueOnError = false; + /** + * Statement separator in SQL initialization scripts. + */ private String separator = ";"; + /** + * SQL scripts encoding. + */ private String sqlScriptEncoding; private EmbeddedDatabaseConnection embeddedDatabaseConnection = EmbeddedDatabaseConnection.NONE; @@ -244,8 +280,14 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB */ public static class Xa { + /** + * XA datasource fully qualified name. + */ private String dataSourceClassName; + /** + * Properties to pass to the XA data source. + */ private Map properties = new LinkedHashMap(); public String getDataSourceClassName() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java index 3b985deb97..dc1baa7cef 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java @@ -30,8 +30,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties("spring.jersey") public class JerseyProperties { + /** + * Jersey integration type. Can be either "servlet" or "filter". + */ private Type type = Type.SERVLET; + /** + * Init parameters to pass to Jersey. + */ private Map init = new HashMap(); private Filter filter = new Filter(); @@ -66,6 +72,9 @@ public class JerseyProperties { public static class Filter { + /** + * Jersey filter chain order. + */ private int order; public int getOrder() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java index 4175af2e79..d9fceac0fa 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java @@ -27,8 +27,15 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.jms") public class JmsProperties { + /** + * Specify if the default destination type is topic. + */ private boolean pubSubDomain = false; + /** + * Connection factory JNDI name. When set, takes precedence to others connection + * factory auto-configurations. + */ private String jndiName; public boolean isPubSubDomain() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java index 0709c08668..56f629404a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java @@ -27,14 +27,30 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.activemq") public class ActiveMQProperties { + /** + * URL of the ActiveMQ broker. Auto-generated by default. + */ private String brokerUrl; + /** + * Specify if the default broker URL should be in memory. Ignored if an explicit + * broker has been specified. + */ private boolean inMemory = true; + /** + * Specify if a PooledConnectionFactory should be created instead of a regular ConnectionFactory. + */ private boolean pooled; + /** + * Login user of the broker. + */ private String user; + /** + * Login password of the broker. + */ private String password; public String getBrokerUrl() { @@ -45,10 +61,6 @@ public class ActiveMQProperties { this.brokerUrl = brokerUrl; } - /** - * Specify if the default broker url should be in memory. Ignored if an explicit - * broker has been specified. - */ public boolean isInMemory() { return this.inMemory; } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java index 4e82779443..4110a6e5db 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java @@ -33,10 +33,19 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.hornetq") public class HornetQProperties { + /** + * HornetQ deployment mode, auto-detected by default. Can be explicitly set to "native" or "embedded". + */ private HornetQMode mode; + /** + * HornetQ broker host. + */ private String host = "localhost"; + /** + * HornetQ broker port. + */ private int port = 5445; private final Embedded embedded = new Embedded(); @@ -76,18 +85,39 @@ public class HornetQProperties { private static final AtomicInteger serverIdCounter = new AtomicInteger(); + /** + * Server id. By default, an auto-incremented counter is used. + */ private int serverId = serverIdCounter.getAndIncrement(); + /** + * Enable embedded mode if the HornetQ server APIs are available. + */ private boolean enabled = true; + /** + * Enable persistent store. + */ private boolean persistent; + /** + * Journal file directory. Not necessary if persistence is turned off. + */ private String dataDirectory; + /** + * Comma-separate list of queues to create on startup. + */ private String[] queues = new String[0]; + /** + * Comma-separate list of topics to create on startup. + */ private String[] topics = new String[0]; + /** + * Cluster password. Randomly generated on startup by default + */ private String clusterPassword = UUID.randomUUID().toString(); private boolean defaultClusterPassword = true; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jta/JtaProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jta/JtaProperties.java index 3ab388e783..fa453f848d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jta/JtaProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jta/JtaProperties.java @@ -34,8 +34,14 @@ public class JtaProperties { public static final String PREFIX = "spring.jta"; + /** + * Transaction logs directory. + */ private String logDir; + /** + * Transaction manager unique identifier. + */ private String transactionManagerId; public void setLogDir(String logDir) { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java index a26179081b..5fe50d4f49 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java @@ -31,23 +31,51 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "liquibase", ignoreUnknownFields = false) public class LiquibaseProperties { + /** + * Change log configuration path. + */ @NotNull private String changeLog = "classpath:/db/changelog/db.changelog-master.yaml"; + /** + * Check the change log location exists. + */ private boolean checkChangeLogLocation = true; + /** + * Comma-separated list of runtime contexts to use. + */ private String contexts; + /** + * Default database schema. + */ private String defaultSchema; + /** + * Drop the database schema first. + */ private boolean dropFirst; + /** + * Enable liquibase support. + */ private boolean enabled = true; + /** + * Login user of the database to migrate. + */ private String user; + /** + * Login password of the database to migrate. + */ private String password; + /** + * JDBC url of the database to migrate. If not set, the primary configured + * data source is used. + */ private String url; public String getChangeLog() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java index a016ef9d04..62928d78d7 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java @@ -31,16 +31,34 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.mail") public class MailProperties { + /** + * SMTP server host. + */ private String host; + /** + * SMTP server port. + */ private Integer port; + /** + * Login user of the SMTP server. + */ private String username; + /** + * Login password of the SMTP server. + */ private String password; + /** + * Default MimeMessage encoding. + */ private String defaultEncoding = "UTF-8"; + /** + * Additional JavaMail session properties. + */ private Map properties = new HashMap(); public String getHost() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverProperties.java index 17569efc97..7a604cc44e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverProperties.java @@ -27,16 +27,34 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties("spring.mobile.devicedelegatingviewresolver") public class DeviceDelegatingViewResolverProperties { + /** + * Prefix that gets prepended to view names for normal devices. + */ private String normalPrefix = ""; + /** + * Suffix that gets appended to view names for normal devices. + */ private String normalSuffix = ""; + /** + * Prefix that gets prepended to view names for mobile devices. + */ private String mobilePrefix = "mobile/"; + /** + * Suffix that gets appended to view names for mobile devices. + */ private String mobileSuffix = ""; + /** + * Prefix that gets prepended to view names for tablet devices. + */ private String tabletPrefix = "tablet/"; + /** + * Suffix that gets appended to view names for tablet devices. + */ private String tabletSuffix = ""; public String getNormalPrefix() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java index aaf274f8e0..39b1b319e9 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java @@ -42,20 +42,44 @@ public class MongoProperties { private static final int DEFAULT_PORT = 27017; + /** + * Mongo server host. + */ private String host; + /** + * Mongo server port. + */ private Integer port = null; + /** + * Mmongo database URI. When set, host and port are ignored. + */ private String uri = "mongodb://localhost/test"; + /** + * Database name. + */ private String database; + /** + * Authentication database name. + */ private String authenticationDatabase; + /** + * GridFS database name. + */ private String gridFsDatabase; + /** + * Login user of the mongo server. + */ private String username; + /** + * Login password of the mongo server. + */ private char[] password; public String getHost() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java index 386c7498a0..fd4419d54d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java @@ -40,14 +40,31 @@ public class JpaProperties { private static final Log logger = LogFactory.getLog(JpaProperties.class); + /** + * Additional native properties to set on the JPA provider. + */ private Map properties = new HashMap(); + /** + * Name of the target database to operate on, auto-detected by default. Can be + * alternatively set using the "Database" enum. + */ private String databasePlatform; + /** + * Target database to operate on, auto-detected by default. Can be alternatively + * set using the "databasePlatform" property. + */ private Database database = Database.DEFAULT; + /** + * Initialize the schema on startup. + */ private boolean generateDdl = false; + /** + * Enable logging of SQL statements. + */ private boolean showSql = false; private Hibernate hibernate = new Hibernate(); @@ -114,8 +131,16 @@ public class JpaProperties { private static final String DEFAULT_NAMING_STRATEGY = "org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy"; + /** + * Naming strategy fully qualified name. + */ private Class namingStrategy; + /** + * DDL mode ("none", "validate", "update", "create", "create-drop"). This is actually a shortcut + * for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, + * "none" otherwise. + */ private String ddlAuto; public Class getNamingStrategy() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java index d52b79916b..f699acc151 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java @@ -27,12 +27,24 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.redis") public class RedisProperties { + /** + * Database index used by the connection factory. + */ private int database = 0; + /** + * Redis server host. + */ private String host = "localhost"; + /** + * Login password of the redis server. + */ private String password; + /** + * Redis server port. + */ private int port = 6379; private Pool pool; @@ -92,12 +104,29 @@ public class RedisProperties { */ public static class Pool { + /** + * Max number of "idle" connections in the pool. Use a negative value to indicate + * an unlimited number of idle connections. + */ private int maxIdle = 8; + /** + * Target for the minimum number of idle connections to maintain in + * the pool. This setting only has an effect if it is positive. + */ private int minIdle = 0; + /** + * Max number of connections that can be allocated by the pool at a given time. Use + * a negative value for no limit. + */ private int maxActive = 8; + /** + * Maximum amount of time (in milliseconds) a connection allocation should block before + * throwing an exception when the pool is exhausted. Use a negative value to block + * indefinitely. + */ private int maxWait = -1; public int getMaxIdle() { @@ -138,8 +167,14 @@ public class RedisProperties { */ public static class Sentinel { + /** + * Name of Redis server. + */ private String master; + /** + * Comma-separated list of host:port pairs. + */ private String nodes; public String getMaster() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java index d454017344..c61884c21c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java @@ -60,8 +60,14 @@ public class SecurityProperties implements SecurityPrequisite { */ public static final int DEFAULT_FILTER_ORDER = 0; + /** + * Enable secure channel for all requests. + */ private boolean requireSsl; + /** + * Enable Cross Site Request Forgery support. + */ // Flip this when session creation is disabled by default private boolean enableCsrf = false; @@ -69,12 +75,21 @@ public class SecurityProperties implements SecurityPrequisite { private final Headers headers = new Headers(); + /** + * Session creation policy (always, never, if_required, stateless). + */ private SessionCreationPolicy sessions = SessionCreationPolicy.STATELESS; + /** + * Comma-separated list of paths to exclude from the default secured paths. + */ private List ignored = new ArrayList(); private final User user = new User(); + /** + * Security filter chain order. + */ private int filterOrder = DEFAULT_FILTER_ORDER; public Headers getHeaders() { @@ -139,14 +154,29 @@ public class SecurityProperties implements SecurityPrequisite { NONE, DOMAIN, ALL } + /** + * Enable cross site scripting (XSS) protection. + */ private boolean xss; + /** + * Enable cache control HTTP headers. + */ private boolean cache; + /** + * Enable "X-Frame-Options" header. + */ private boolean frame; + /** + * Enable "X-Content-Type-Options" header. + */ private boolean contentType; + /** + * HTTP Strict Transport Security (HSTS) mode (none, domain, all). + */ private HSTS hsts = HSTS.ALL; public boolean isXss() { @@ -193,10 +223,19 @@ public class SecurityProperties implements SecurityPrequisite { public static class Basic { + /** + * Enable basic authentication. + */ private boolean enabled = true; + /** + * HTTP basic realm name. + */ private String realm = "Spring"; + /** + * Comma-separated list of paths to secure. + */ private String[] path = new String[] { "/**" }; public boolean isEnabled() { @@ -227,10 +266,19 @@ public class SecurityProperties implements SecurityPrequisite { public static class User { + /** + * Default user name. + */ private String name = "user"; + /** + * Password for the default user name. + */ private String password = UUID.randomUUID().toString(); + /** + * Granted roles for the default user name. + */ private List role = new ArrayList(Arrays.asList("USER")); private boolean defaultPassword = true; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/social/SocialProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/social/SocialProperties.java index 80722633a0..17eef74a63 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/social/SocialProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/social/SocialProperties.java @@ -26,8 +26,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties; */ abstract class SocialProperties { + /** + * Application id. + */ private String appId; + /** + * Application secret. + */ private String appSecret; public String getAppId() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java index f320cd5bde..4ffc6a9545 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java @@ -27,8 +27,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.data.solr") public class SolrProperties { + /** + * Solr host. Ignored if "zk-host" is set. + */ private String host = "http://127.0.0.1:8983/solr"; + /** + * ZooKeeper host address in the form HOST:PORT. + */ private String zkHost; public String getHost() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java index d077cb58a3..5e907d31bd 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java @@ -31,18 +31,39 @@ import org.springframework.web.servlet.view.AbstractTemplateViewResolver; public abstract class AbstractTemplateViewResolverProperties extends AbstractViewResolverProperties { + /** + * Prefix that gets prepended to view names when building a URL. + */ private String prefix; + /** + * Suffix that gets appended to view names when building a URL. + */ private String suffix; + /** + * Name of the RequestContext attribute for all views. + */ private String requestContextAttribute; + /** + * Set whether all request attributes should be added to the model prior to merging with the template. + */ private boolean exposeRequestAttributes = false; + /** + * Set whether all HttpSession attributes should be added to the model prior to merging with the template. + */ private boolean exposeSessionAttributes = false; + /** + * Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. + */ private boolean allowRequestOverride = false; + /** + * Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". + */ private boolean exposeSpringMacroHelpers = true; protected AbstractTemplateViewResolverProperties(String defaultPrefix, diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractViewResolverProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractViewResolverProperties.java index 04264da201..1ed5c8e50e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractViewResolverProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractViewResolverProperties.java @@ -29,14 +29,29 @@ import org.springframework.web.servlet.ViewResolver; */ public abstract class AbstractViewResolverProperties { + /** + * Enable template caching. + */ private boolean cache; + /** + * Content-Type value. + */ private String contentType = "text/html"; + /** + * Template encoding. + */ private String charset = "UTF-8"; + /** + * White list of view names that can be resolved. + */ private String[] viewNames; + /** + * Check that the templates location exists. + */ private boolean checkTemplateLocation = true; public void setCheckTemplateLocation(boolean checkTemplateLocation) { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java index 240caf5210..b6ec683c1c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java @@ -31,22 +31,49 @@ public class ThymeleafProperties { public static final String DEFAULT_SUFFIX = ".html"; + /** + * Check that the templates location exists. + */ private boolean checkTemplateLocation = true; + /** + * Prefix that gets prepended to view names when building a URL. + */ private String prefix = DEFAULT_PREFIX; + /** + * Suffix that gets appended to view names when building a URL. + */ private String suffix = DEFAULT_SUFFIX; + /** + * Template mode to be applied to templates. See also StandardTemplateModeHandlers. + */ private String mode = "HTML5"; + /** + * Template encoding. + */ private String encoding = "UTF-8"; + /** + * Content-Type value. + */ private String contentType = "text/html"; + /** + * Enable template caching. + */ private boolean cache = true; + /** + * Comma-separated list of view names that can be resolved. + */ private String[] viewNames; + /** + * Comma-separated list of view names that should be excluded from resolution. + */ private String[] excludedViewNames; public boolean isCheckTemplateLocation() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java index 2ca79ee7dd..1e7b5317ec 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java @@ -38,16 +38,37 @@ public class VelocityProperties extends AbstractTemplateViewResolverProperties { public static final String DEFAULT_SUFFIX = ".vm"; + /** + * Name of the DateTool helper object to expose in the Velocity context of the view. + */ private String dateToolAttribute; + /** + * Name of the NumberTool helper object to expose in the Velocity context of the view. + */ private String numberToolAttribute; + /** + * Additional velocity properties. + */ private Map properties = new HashMap(); + /** + * Template path. + */ private String resourceLoaderPath = DEFAULT_RESOURCE_LOADER_PATH; + /** + * Velocity Toolbox config location, for example "/WEB-INF/toolbox.xml". Automatically + * loads a Velocity Tools toolbox definition file and expose all defined tools in the + * specified scopes. + */ private String toolboxConfigLocation; + /** + * Prefer file system access for template loading. File system access enables hot + * detection of template changes. + */ private boolean preferFileSystemAccess = true; public VelocityProperties() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpEncodingProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpEncodingProperties.java index 835b41314d..0fb2fed72c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpEncodingProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpEncodingProperties.java @@ -32,13 +32,13 @@ public class HttpEncodingProperties { public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); /** - * The Charset to use. + * Charset of HTTP requests and responses. Added to the "Content-Type" header if not + * set explicitly. */ private Charset charset = DEFAULT_CHARSET; /** - * To force the encoding to the configured charset typically on HTTP requests and - * responses. + * Force the encoding to the configured charset on HTTP requests and responses. */ private boolean force = true; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMapperProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMapperProperties.java index 107f162d79..71ee76cb20 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMapperProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/HttpMapperProperties.java @@ -38,8 +38,14 @@ public class HttpMapperProperties { private final Log logger = LogFactory.getLog(HttpMapperProperties.class); + /** + * Enable json pretty print. + */ private Boolean jsonPrettyPrint; + /** + * Enable key sorting. + */ private Boolean jsonSortKeys; public void setJsonPrettyPrint(Boolean jsonPrettyPrint) { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java index a65c1c21cf..54257a3b4e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java @@ -50,12 +50,27 @@ import org.springframework.util.StringUtils; @ConfigurationProperties(prefix = "multipart", ignoreUnknownFields = false) public class MultipartProperties { + /** + * Intermediate location of uploaded files. + */ private String location; + /** + * Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte + * or Kilobyte size. + */ private String maxFileSize = "1Mb"; + /** + * Max request size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte + * or Kilobyte size. + */ private String maxRequestSize = "10Mb"; + /** + * Threshold after which files will be written to disk. Values can use the suffixed "MB" + * or "KB" to indicate a Megabyte or Kilobyte size. + */ private String fileSizeThreshold = "0"; public String getMaxFileSize() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java index af4084ccc7..d7182b6a7b 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java @@ -27,8 +27,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "spring.resources", ignoreUnknownFields = false) public class ResourceProperties { + /** + * Cache period for the resources served by the resource handler, in seconds. + */ private Integer cachePeriod; + /** + * Enable default resource handling. + */ private boolean addMappings = true; public Integer getCachePeriod() { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 30c6de116d..eda4e14797 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -58,17 +58,32 @@ import org.springframework.util.StringUtils; @ConfigurationProperties(prefix = "server", ignoreUnknownFields = false) public class ServerProperties implements EmbeddedServletContainerCustomizer { + /** + * Server HTTP port. + */ private Integer port; + /** + * Network address to which the server should bind to. + */ private InetAddress address; + /** + * Session timeout in seconds. + */ private Integer sessionTimeout; + /** + * Context path of the application. + */ private String contextPath; @NestedConfigurationProperty private Ssl ssl; + /** + * Path of the main dispatcher servlet. + */ @NotNull private String servletPath = "/"; @@ -76,6 +91,9 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { private final Undertow undertow = new Undertow(); + /** + * ServletContext parameters. + */ private final Map contextParameters = new HashMap(); public Tomcat getTomcat() { @@ -223,29 +241,64 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { public static class Tomcat { + /** + * Format pattern for access logs. + */ private String accessLogPattern; + /** + * Enable access log. + */ private boolean accessLogEnabled = false; + /** + * Regular expression that matches proxies that are to be trusted. + */ private String internalProxies = "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|" // 10/8 + "192\\.168\\.\\d{1,3}\\.\\d{1,3}|" // 192.168/16 + "169\\.254\\.\\d{1,3}\\.\\d{1,3}|" // 169.254/16 + "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"; // 127/8 + /** + * Header that holds the incoming protocol, usually named "X-Forwarded-Proto". Configured + * as a RemoteIpValve only if remoteIpHeader is also set. + */ private String protocolHeader; + /** + * Name of the HTTP header used to override the original port value. + */ private String portHeader; + /** + * Name of the http header from which the remote ip is extracted. Configured as a + * RemoteIpValve only if remoteIpHeader is also set. + */ private String remoteIpHeader; + /** + * Tomcat base directory. If not specified a temporary directory will be used. + */ private File basedir; + /** + * Delay in seconds between the invocation of backgroundProcess methods. + */ private int backgroundProcessorDelay = 30; // seconds + /** + * Maximum amount of worker threads. + */ private int maxThreads = 0; // Number of threads in protocol handler + /** + * Maximum size in bytes of the HTTP message header. + */ private int maxHttpHeaderSize = 0; // bytes + /** + * Character encoding to use to decode the URI. + */ private String uriEncoding; public int getMaxThreads() { @@ -409,12 +462,24 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { public static class Undertow { + /** + * Size of each buffer in bytes. + */ private Integer bufferSize; + /** + * Number of buffer per region. + */ private Integer buffersPerRegion; + /** + * Number of I/O threads to create for the worker. + */ private Integer ioThreads; + /** + * Number of worker threads. + */ private Integer workerThreads; private Boolean directBuffers; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcProperties.java index 2ec253a034..a1e19182bb 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcProperties.java @@ -28,10 +28,19 @@ import org.springframework.validation.DefaultMessageCodesResolver; @ConfigurationProperties("spring.mvc") public class WebMvcProperties { + /** + * Formatting strategy for message codes (PREFIX_ERROR_CODE, POSTFIX_ERROR_CODE). + */ private DefaultMessageCodesResolver.Format messageCodesResolverFormat; + /** + * Locale to use. + */ private String locale; + /** + * Date format to use (e.g. dd/MM/yyyy) + */ private String dateFormat; public DefaultMessageCodesResolver.Format getMessageCodesResolverFormat() { diff --git a/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 9877dd3d4a..06fcbf0b79 100644 --- a/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -2,7 +2,7 @@ { "name": "spring.aop.auto", "type": "java.lang.Boolean", - "description": "Automatically adds @EnableAspectJAutoProxy.", + "description": "Add @EnableAspectJAutoProxy.", "defaultValue": true }, { @@ -20,37 +20,37 @@ { "name": "spring.dao.exceptiontranslation.enabled", "type": "java.lang.Boolean", - "description": "Enables the PersistenceExceptionTranslationPostProcessor.", + "description": "Enable the PersistenceExceptionTranslationPostProcessor.", "defaultValue": true }, { "name": "spring.datasource.jmx-enabled", "type": "java.lang.Boolean", - "description": "Enables JMX support (if provided by the underlying pool).", + "description": "Enable JMX support (if provided by the underlying pool).", "defaultValue": false }, { "name": "spring.data.elasticsearch.repositories.enabled", "type": "java.lang.Boolean", - "description": "Automatically enable Elasticsearch repositories.", + "description": "Enable Elasticsearch repositories.", "defaultValue": true }, { "name": "spring.data.jpa.repositories.enabled", "type": "java.lang.Boolean", - "description": "Automatically enable JPA repositories.", + "description": "Enable JPA repositories.", "defaultValue": true }, { "name": "spring.data.mongodb.repositories.enabled", "type": "java.lang.Boolean", - "description": "Automatically enable Mongo repositories.", + "description": "Enable Mongo repositories.", "defaultValue": true }, { "name": "spring.data.solr.repositories.enabled", "type": "java.lang.Boolean", - "description": "Automatically enable Solr repositories.", + "description": "Enable Solr repositories.", "defaultValue": true }, { @@ -62,13 +62,13 @@ { "name": "spring.jmx.enabled", "type": "java.lang.Boolean", - "description": "Automatically expose management beans to the JMX domain", + "description": "Expose management beans to the JMX domain.", "defaultValue": true }, { "name": "spring.jpa.open-in-view", "type": "java.lang.Boolean", - "description": "Automatically register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the thread for the entire processing of the request.", + "description": "Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the thread for the entire processing of the request.", "defaultValue": true }, { @@ -92,7 +92,7 @@ { "name": "spring.social.auto-connection-views", "type": "java.lang.Boolean", - "description": "Automatically enable the connection status view for supported providers.", + "description": "Enable the connection status view for supported providers.", "defaultValue": false }, { diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java index 3a8a7ffdb6..a0c9918e06 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java @@ -25,6 +25,9 @@ package org.springframework.boot.context.embedded; */ public class Ssl { + /** + * Client authentication mode ("want", "need"). + */ private ClientAuth clientAuth; private String[] ciphers; @@ -33,8 +36,14 @@ public class Ssl { private String keyPassword; + /** + * Path to the key store (typically a jks file). + */ private String keyStore; + /** + * Login password of the key store. + */ private String keyStorePassword; private String keyStoreType; @@ -49,6 +58,9 @@ public class Ssl { private String trustStoreProvider; + /** + * SSL protocol to use. + */ private String protocol = "TLS"; public ClientAuth getClientAuth() { diff --git a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 3da48ac92e..3424fcdc52 100644 --- a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -13,13 +13,13 @@ { "name": "logging.file", "type": "java.lang.String", - "description": "The name of the log file.", + "description": "Log file name.", "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" }, { "name": "logging.level", "type": "java.util.Map", - "description": "The log levels. Use 'root' for the root logger.", + "description": "Log levels severity mapping. Use 'root' for the root logger.", "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" }, { @@ -32,38 +32,38 @@ "name": "spring.mandatory-file-encoding", "sourceType": "org.springframework.boot.context.FileEncodingApplicationListener", "type": "java.lang.String", - "description": "The character encoding the application must use." + "description": "Expected character encoding the application must use." }, { "name": "spring.application.name", "type": "java.lang.String", "sourceType": "org.springframework.boot.context.ContextIdApplicationContextInitializer", - "description": "The name of the application." + "description": "Application name." }, { "name": "spring.application.index", "type": "java.lang.Integer", "sourceType": "org.springframework.boot.context.ContextIdApplicationContextInitializer", - "description": "Index of the application." + "description": "Application index." }, { "name": "spring.config.name", "type": "java.lang.String", "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", - "description": "Config file name", + "description": "Config file name.", "defaultValue": "application" }, { "name": "spring.config.location", "type": "java.lang.String", "sourceType": "org.springframework.boot.context.config.ConfigFileApplicationListener", - "description": "Config file locations" + "description": "Config file locations." }, { "name": "spring.main.show-banner", "type": "java.lang.Boolean", "sourceType": "org.springframework.boot.SpringApplication", - "description": "Display the banner when the application runs", + "description": "Display the banner when the application runs.", "defaultValue": true }, { @@ -76,12 +76,12 @@ "name": "spring.main.web-environment", "type": "java.lang.Boolean", "sourceType": "org.springframework.boot.SpringApplication", - "description": "Run the application in a web environment (auto-detected by default)" + "description": "Run the application in a web environment (auto-detected by default)." }, { "name": "spring.profiles.active", "type": "java.lang.String", - "description": "Set the active profiles as a comma separated list. Can be overridden by a command line switch." + "description": "Comma-separated list of active profiles. Can be overridden by a command line switch." }, { "name": "spring.profiles.include",