Commit Graph

146 Commits

Author SHA1 Message Date
Andy Wilkinson 03b109a2c8 Polish Elasticsearch health indicator
- Nest the configuration class in HealthIndicatorAutoConfiguration,
   bringing it into line with the other health indicator configuration
   classes
 - Include the statistics from the response in the health’s details
 - Map YELLOW to UP rather than UNKNOWN as it indicates that the cluster
   is running but that “the primary shard is allocated but replicas are
   not” [1]. The details can be used to determine the precise state of
   the cluster.
 - Add a property to configure the time that the health indicator will
   wait to receive a response from the cluster
 - Document the configuration properties
 - Update the tests to cover the updated functionality

See gh-2399

[1] http://www.elastic.co/guide/en/elasticsearch/reference/1.x/cluster-health.html
2015-04-09 10:16:32 +01:00
Andy Wilkinson 1dcf18b16e Allow Jackson's serialization inclusion to be configured via the env
This commit adds support for configuring an ObjectMapper's
serialization inclusion using the environment via the
spring.jackson.serialization-inclusion property. The property's value
should be one of the values on the JsonInclude.Include enumeration.
Relaxed binding of the property value to the enum is supported. For
example:

spring.jackson.serialization-inclusion: non_null

Closes gh-2532
2015-04-08 16:47:49 +01:00
Andy Wilkinson c51277f6eb Merge branch '1.2.x' 2015-04-07 17:49:42 +01:00
izeye d8f45ab6ca Document MultipartProperties
Closes gh-2779
2015-04-07 17:49:15 +01:00
Andy Wilkinson fa4562f408 Polishing: spaces -> tabs 2015-04-07 17:48:40 +01:00
Andy Wilkinson 3df6cb1325 Merge branch '1.2.x' 2015-04-07 11:37:43 +01:00
Andy Wilkinson 212520fa15 Add a property to disable auto-configuration of GzipFilter
Closes gh-2776
2015-04-07 11:24:24 +01:00
Andy Wilkinson 9444a25de3 Merge branch '1.2.x' 2015-03-18 14:06:36 +00:00
Andy Wilkinson 0a38b9b3ab Enable the configuration of arbitrary Elasticsearch client properties
Previously, only a handful of properties could be set when
auto-configuring an Elasticsearch client. This commit introduces support
for configuring arbitrary properties using the
spring.data.elasticsearch.properties prefix. For example,
client.transport.sniff can be configured using
spring.data.elasticsearch.properties.client.transport.sniff.

Closes gh-1838
2015-03-18 14:06:11 +00:00
Andy Wilkinson b2a68d700f Merge branch '1.2.x' 2015-03-17 11:49:03 +00:00
Andy Wilkinson 89b4cac8b0 Allow Elasticsearch client-transport-sniff to be configured via the env
Previously, a TransportClient sniff property could not be configured
while using Spring Boot’s Elasticsearch auto-configuration. This commit
adds a new property, spring.data.elasticsearch.client-transport-sniff,
that can be used to configure the TransportClient while continuing to
use the auto-configuration support.

Closes gh-1838
2015-03-17 11:48:55 +00:00
Eric Dahl 018310e478 Fix broken link in docs 2015-03-10 08:21:21 +01:00
Eric Dahl 47b6d9588c Fix broken link in docs 2015-03-08 14:40:27 -07:00
Maciej Walkowiak f05769dcc5 Add auto-configuration for SendGrid's client
Closes gh-2160
Closes gh-2280
2015-03-05 16:09:56 +00:00
Phillip Webb 1231da1c2f Add security.basic.authorize-mode property
Add a `security.basic.authorize-mode` property that can be used to
affect how basic security authorization is applied.

Fixes gh-2462
2015-02-25 12:36:55 -08:00
Phillip Webb f7221be7c9 Rename spring.favicon.enabled property
Rename `spring.favicon.enabled` to `spring.mvc.favicon.enabled`.

See gh-2377
2015-02-25 11:36:28 -08:00
izeye 1493da1e03 Improve documentation
Closes gh-2553
2015-02-25 11:32:58 -08:00
izeye 319663a628 Improve doc for application.properties. 2015-02-08 09:58:40 +01:00
Andy Wilkinson b4cb7a35c9 Document spring.http.converters.preferred-json-mapper
See gh-2247
2015-02-05 12:06:19 +00:00
Phillip Webb e1a80fa496 Fix broken reference documentation link 2015-02-02 21:30:49 -08:00
Andy Wilkinson 528a632fd1 Allow XA DataSource and ConnFactory pools to be configured via the env
This commit adds support for configuring the XA DataSource and
ConnectionFactory pools created by Atomikos and Bitronix via the
environment. The property prefixes vary depending on the transaction
manager that’s in use. They are:

Bitronix:
 - spring.jta.bitronix.datasource
 - spring.jta.bitronix.connectionfactory

Atomikos:
 - spring.jta.atomikos.datasource
 - spring.jta.atomikos.connectionfactory

The configuration processor has been updated to ignore
javax.jms.XAConnectionFactory and javax.sql.XADataSource as neither of
these types can be created via property binding.

Closes gh-2027
2015-01-27 10:55:56 +00:00
Andy Wilkinson e2f2839d32 Document Tomcat compression and GzipFilter auto-configuration
Closes gh-2031
2015-01-16 12:07:29 +00:00
Phillip Webb 4ad5c52dd7 Add support for `server.ssl.enabled` property
Fixes gh-2241
2015-01-06 21:51:50 -08:00
Phillip Webb c7cfdbe250 Polish appendix 2014-12-28 12:22:16 -08:00
Phillip Webb fd97c7553c Apply HATEOAS module to primary ObjectMapper
Update HypermediaAutoConfiguration to apply the Jackson2HalModule to
the primary ObjectMapper. This restores the behavior of Spring Boot
1.1 where HATEOAS types could be serialized for both `application/json`
and `application/json+hal` content types.

A `spring.hateoas.apply-to-primary-object-mapper` property has also been
provided to opt-out if necessary.

Fixes gh-2147
2014-12-22 20:35:50 -08:00
Stephane Nicoll b8612d99c6 Add explicit reference to health.*
Health indicator configuration keys have moved from the health.* to the
management.health.* namespace. This commit adds an explicit reference
to the previous location.

See gh-2128
2014-12-12 17:11:13 +01:00
Stephane Nicoll 1da0deeef6 Add missing keys in appendix 2014-12-09 18:04:47 +01:00
Phillip Webb af643e2f54 Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2014-12-05 10:25:30 -08:00
kakawait f65c7dbeb3 Update 'flyway.locations' appendix documentation
Replace `classpath:db/migrations` with `classpath:db/migrations`.

Fixes gh-2063
2014-12-05 10:23:54 -08:00
Phillip Webb 211f20b9c6 Add setIgnoreDefaultModelOnRedirect support
Add a `spring.mvc.set-ignore-default-model-on-redirect` property to
allow RequestMappingHandlerAdapter.setIgnoreDefaultModelOnRedirect to
be easily customized and change the default value to 'true'.

Fixes gh-2018
2014-12-03 11:31:09 -08:00
Dave Syer 3bb598a421 Only hide /health details if the app is actually secure
Also gives the user the option to override (by setting
endpoints.health.sensitive=false).

Fixes gh-1977 in a slightly different way
2014-11-25 16:40:18 +00:00
Andy Wilkinson 55fadf1231 Merge branch '1.1.x' 2014-11-25 13:54:06 +00:00
Sjoerd Mulder cc557833a4 Escape backslashes in .properties examples of setting internal-proxies
In a properties file, a backslash is used as an escape character for
the line terminator sequence to allow values to be split across
multiple lines. When a backslash is used elsewhere they're stripped
out of the property's value.

This commit updates .properties-based examples for configuring
server.tomcat.internal-proxies to escape the backslahes so that they
are retained in the property's value at runtime.

See gh-1989
2014-11-25 13:39:25 +00:00
Andy Wilkinson 26a511495e Allow the user to opt-out of anonymous access restrictions for /health
By default, when /health is accessed anonymously, the details are
stripped, i.e. the response will only indicate UP or DOWN. Furthermore
the response is cached for a configurable period to prevent a denial
of service attack.

This commit adds a configuration property,
endpoints.health.restrict-anonymous-access, that can be set to false
to allow full anonymous access to /health. When full access is
allowed, the details will be included in the response and the response
will not be cached.

Closes gh-1977
2014-11-25 12:04:45 +00:00
Stephane Nicoll 4402c6b4a0 Haromonize configuration keys to lowercase hyphen 2014-11-25 09:00:02 +01:00
Phillip Webb 2b57c5a4dd Rename spring.data.mongo.repositories.enabled
Rename mongo to mongodb.

Fixes gh-1966
2014-11-20 14:57:49 -08:00
Phillip Webb 670ba33bec Improve MongoDataAutoConfiguration
Update MongoDataAutoConfiguration to provide easier configuration of
CustomConversions, the MappingMongoConverter, MongoMappingContext
and an authentication database.

Fixes gh-1619
Fixes gh-1730
2014-11-20 14:55:19 -08:00
Phillip Webb c34cfb27a3 Polish 2014-11-19 10:52:26 -08:00
Andy Wilkinson 35b7ba5cda Deprecate http.mappers.* properties
The http.mappers.* configuration properties assumed that the mapping
was JSON (on of the property names was jsonPrettyPrint) and also only
exposed a small subset of the configuration options supported by
Jackson (and GSON). The property names implied that it would configure
all HTTP mapping, however it was ignored by GsonAutoConfiguration.

This commit deprecates the support for http.mappers.* in favour of
configuring Jackson or Gson instead. Jackson can be configured
declaratively using the spring.jackson.* properties or programtically.
Gson can be configured programatically by using a GsonBuilder to
create a Gson instance with the desired configuration.
gh-1946 has been opened to add support for declarative configuration
of Gson.

Closes gh-1945
2014-11-18 13:51:48 +00:00
Andy Wilkinson 05cf686713 Allow servlet context parmeters to be configured via declaratively
Previously, configuration of a ServletContext init parameter required
the use of a ServletContextInitializer bean. This commmit adds
support for declarative configuration via the environment using
server.context_parameters.<name>=<value>.

Closes gh-1791
2014-11-17 20:20:08 +00:00
Stephane Nicoll 8112aca9e8 Add documentation for email integration
Closes gh-1904
2014-11-17 14:43:46 +01:00
Stephane Nicoll 109c3a3439 Auto configure CharacterEncodingFilter
Provide a default UTF-8 encoding for HTTP requests and responses unless
specified otherwise.

Fixes gh-1182
2014-11-11 12:01:15 +01:00
Stephane Nicoll 00961611b2 Move health.* properties to management.health.*
Fixes gh-1841
2014-11-07 07:20:34 +00:00
Phillip Webb 96a031cf20 Default spring.datasource.jmx-enabled to false
Change the default value of spring.datasource.jmx-enabled to false
to prevent InstanceAlreadyExistsException problems when using the
Spring Test Framework.

Fixes gh-1590
2014-11-06 21:38:07 -08:00
Phillip Webb 58d660d10d Allow DAO ExceptionTranslator to proxy classes
Update the auto-configured PersistenceExceptionTranslationPostProcessor
to proxy target classes as well as interfaces. Also provide a config
property to disable registration all together.

Fixes gh-1844
2014-11-06 19:13:50 -08:00
Phillip Webb ba0dd60de9 Rename charSet to charset
Rename AbstractTemplateViewResolverProperties.setCharSet/getCharSet to
setCharset/getCharset, deprecating the old method.

Fixes gh-1835
2014-11-05 16:57:05 -08:00
Phillip Webb ab7f73f365 Use dashed case for properties appendix
Additional items added since 1.1.x

Fixes gh-1834
2014-11-05 16:52:59 -08:00
Phillip Webb df1d035162 Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
2014-11-05 16:51:33 -08:00
Phillip Webb 2f17c38822 Use dashed case for properties appendix
Fixes gh-1834
2014-11-05 16:50:21 -08:00
Phillip Webb ea6162254d Update pidfile property and add documentation
Change the pidfile property from `spring.application.pidfile` to
`spring.pidfile` (to save confusion with SpringApplication properties).

Also added documentation and meta-data information.

See gh-1579
2014-11-05 08:29:17 -08:00