1979 Commits

Author SHA1 Message Date
Marcel Overdijk
e070d55491 Make Jackson date format and property naming strategy configurable
Allow the environment to be used to configure Jackson's date format
and property naming strategy

Closes gh-1628
2014-09-30 11:07:29 +01:00
Phillip Webb
1ed90df630 Merge branch '1.1.x' 2014-09-25 13:06:54 -07:00
Phillip Webb
bff39e954e Add server.tomcat.port-header support
Update Tomcat ServerProperties to support the RemoteIpValve portHeader
property.

Fixes gh-1616
2014-09-25 13:04:12 -07:00
Andy Wilkinson
0c63406b49 Merge branch '1.1.x' 2014-09-25 19:06:37 +01:00
Andy Wilkinson
72ef1d6554 Update ErrorPageFilter so it won’t try to forward a committed response
In some scenarios, the ErrorPageFilter will want to forward the request
to an error page but the response has already been committed. One common
cause of this is when the filter’s running on WAS. WAS calls
flushBuffer() (which commits the response), upon a clean exit from a
servlet’s service method.

Previously, the filter would attempt the forward, even if the response
was committed. This would result in an IllegalStateException and a
possibly incomplete response that may also have an incorrect status
code.

This commit updates the ErrorPageFilter to check to see if the response
has already been committed before it attempts to forward the request to
the error page. If the response has already been committed, the filter
logs an error and allows the container’s normal handling to kick in.
This prevents an IllegalStateException from being thrown.

This commit also updates the response wrapper to keep track of when
sendError has been called. Now, when flushBuffer is called, if
sendError has been called, the wrapper calls sendError on the wrapped
response. This prevents the wrapper from suppressing an error when the
response is committed before the request handling returns to the error
page filter.

Closes gh-1575
2014-09-25 19:05:59 +01:00
Phillip Webb
55a84c7bd7 Merge branch '1.1.x' 2014-09-24 14:12:02 -07:00
Phillip Webb
142216400a Polish formatting 2014-09-24 12:04:40 -07:00
Dave Syer
97dcd24668 Merge branch '1.1.x' 2014-09-22 12:16:21 +01:00
Dave Syer
a63d0b4e16 Update docs with DispatcherType.ERROR for filters
Some frameworks handle all requests in a Filter, so you have to
explicitly register it as an ERROR dispatcher.

See gh-1272
2014-09-22 12:15:02 +01:00
Andy Wilkinson
c2e588a37c Merge branch '1.1.x' 2014-09-22 09:13:21 +01:00
N Jain
a8af254765 Fix description of test file to be tests.groovy
Corrected the documentation to refer to file as tests.groovy, rather
than test.groovy. Updated cope snippet as tests.groovy should expect
"Hello World!" rather than "Hello World".

Closes gh-1593
2014-09-22 09:12:59 +01:00
Stephane Nicoll
aeeade2ed5 Merge missed documentation update
Cherry pick documentation updates which appear to have been
lost during a previous merge.

Fixes gh-1523
Cheery-picked from 16c2477d
2014-09-17 11:20:56 -07:00
Phillip Webb
62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
2014-09-17 10:08:05 -07:00
Andy Wilkinson
284e7b2091 Merge branch '1.1.x' 2014-09-16 15:40:23 +01:00
Andy Wilkinson
468b6cb1f7 Add support for configuring RemoteIpValve’s internalProxies
Closes gh-1522
2014-09-16 15:40:18 +01:00
Andy Wilkinson
4b25b0e7a2 Allow Jackson features to be configured via the environment
Enhance JacksonAutoConfiguration to configure features on the
ObjectMapper it creates based on the following configuration
properties:

spring.jackson.deserialization.* = true|false
spring.jackson.generator.* = true|false
spring.jackson.mapper.* = true|false
spring.jackson.parser.* = true|false
spring.jackson.serialization.* = true|false

The final part of each property name maps onto an enum. The enums are:

deserialization: com.fasterxml.jackson.databind.DeserializationFeature
generator: com.fasterxml.jackson.core.JsonGenerator.Feature
mapper: com.fasterxml.jackson.databind.MapperFeature
parser: com.fasterxml.jackson.core.JsonParser.Feature
serialization: com.fasterxml.jackson.databind.SerializationFeature

Closes gh-1227
2014-09-16 09:59:59 +01:00
Phillip Webb
565e449d89 Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/howto.adoc
2014-09-15 11:37:50 -07:00
Phillip Webb
5ba86a103d Polish 2014-09-15 11:35:16 -07:00
Andy Wilkinson
8deb88b3c0 Merge branch '1.1.x' 2014-09-15 16:40:42 +01:00
Andy Wilkinson
2ba2cfe23d Document build-time property expansion using Gradle
Closes gh-1540
2014-09-15 16:25:00 +01:00
Dave Syer
bfab6b45f5 Merge branch '1.1.x' 2014-09-13 11:01:10 -05:00
Dave Syer
7828f2a5d3 Update docs on metrics names 2014-09-13 11:00:55 -05:00
Vladimir Tsanev
258c6f116a Add store type and store provider properties to SSL configuration
Closes gh-1545
2014-09-12 14:50:06 -05:00
Stephane Nicoll
037e3a4221 Fix typo in documentation
Fixes gh-1527
2014-09-12 12:22:23 -05:00
Christoph Strobl
c8a4891441 Add support for Redis Sentinel configuration
Spring Data Redis 1.4.0 introduced Redis Sentinel support. When
specified, RedisConnectionFactory uses the Sentinel configuration to
determine the current master.

Sentinel configuration can be specified using two new properties:
spring.redis.sentinel.master and spring.redis.sentinel.nodes.

For example:

spring.redis.sentinel.master=mymaster # name of redis server
spring.redis.sentinel.nodes=127.0.0.1:26379,127.0.0.1:26380

Alternatively, a bean of type RedisSentinelConfiguration can be declared
and it will be used to configure the connection factory.

Note: At this time, Sentinel support is only available for Jedis

Closes gh-1337
2014-09-07 17:00:38 -05:00
Andy Wilkinson
dde7ebf30f Merge branch '1.1.x' 2014-09-07 15:45:53 -05:00
John Tims
a4e08beebc Add missing variable to the example in the Loading YAML section
Closes gh-1524
2014-09-07 15:43:22 -05:00
Christoph Frick
3b07e4e633 Fix typos in the documentation: though -> through
Closes gh-1510
2014-09-07 11:03:49 -05:00
Christoph Frick
5455b42d32 Fix typos in the documentation: though -> through
Closes gh-1510
2014-09-07 11:00:09 -05:00
David Liu
8e9e502b6a Add support for auto-configuration of Commons DBCP2
Closes gh-1292
Closes gh-1477
2014-09-07 10:43:48 -05:00
Stephane Nicoll
8ed461947f Improve RabbitMQ support in CLI
This commit deprecates the proprietary EnableRabbitMessaging annotation
in favour of the standard @EnableRabbit introduced as of Spring Rabbit
1.4.

Fixes gh-1494
2014-09-05 17:52:20 +02:00
Dave Syer
9a2f9825d1 Fix asciidoc syntax 2014-09-05 16:33:32 +01:00
Dave Syer
993c7691ec Fix recommended authentication configuration to match samples 2014-09-05 16:30:54 +01:00
Andy Wilkinson
ad8be26efd Merge branch '1.1.x' 2014-09-04 17:04:43 +01:00
Andy Wilkinson
990213b8b8 Correct reference to ConfigurableEmbeddedServletContainerFactory
Closes gh-1500
2014-09-04 17:04:38 +01:00
Phillip Webb
35a840a396 Replace mavenCentral() with jcenter() in docs
Fixes gh-1373
2014-09-03 18:46:56 -07:00
Phillip Webb
f7cffce695 Allow custom JNDI ConnectionFactory lookup
Add a `spring.jms.jndi-name` property to allow a JMS ConnectionFactory
to be obtained from a custom JNDI location.

Fixes gh-1471
2014-09-03 18:35:45 -07:00
Phillip Webb
6f62fc854b Merge branch '1.1.x' 2014-09-03 11:45:54 -07:00
Phillip Webb
449752c9e2 Minor asciidoctor formatting 2014-09-03 08:38:31 -07:00
Stephane Nicoll
383288f1c2 Merge branch '1.1.x' 2014-09-03 16:32:24 +02:00
Stephane Nicoll
811f5ab80c Clarify the use of spring.profiles
Fixes gh-1470
2014-09-03 16:30:55 +02:00
Phillip Webb
236026a43a Support mixed XA/non-XA ConnectionFactory beans
Update ActiveMQ and HornetQ XA configurations to also expose non-xa
ConnectionFactory variants.

Fixes gh-1461
2014-09-02 13:00:59 -07:00
Phillip Webb
5001b038cb Expose additional pool metrics
Expose `max` and `min`, alongside the existing `active` and `usage`
metrics.
2014-09-01 12:38:31 -07:00
Stephane Nicoll
53c4859a6a Reuse data source validation query in health endpoint
This commit improves DataSourceMetadata to expose the validation
query. This can be used by DataSourceHealthIndicator as the query
to use instead of "guessing" which query could be applied according
to the database type.

Fixes gh-1282
2014-08-29 14:58:01 +02:00
Stephane Nicoll
3dc932db88 DataSource metrics
This commit adds an abstraction that provides a standard manner to
retrieve various metadata that are shared by most data sources.

DataSourceMetadata is implemented by the three data source
implementations that boot supports out-of-the-box: Tomcat, Hikari and
Commons dbcp.

This abstraction is used to provide two additional metrics per data
source defined in the application: the number of allocated
connection(s) (.active) and the current usage of the connection pool
(.usage).

All such metrics share the 'datasource.' prefix. The prefix is further
qualified for each data source:

* If the data source is the primary data source (that is either the
  only available data source or the one flagged @Primary amongst the
  existing ones), the prefix is "datasource.primary"
* If the data source bean name ends with "dataSource", the prefix is
  the name of the bean without it (i.e. batchDataSource becomes batch)
* In all other cases, the name of the bean is used

It is possible to override part or all of those defaults by
registering a bean with a customized version of
DataSourcePublicMetrics.

Additional DataSourceMetadata implementations for other data source
types can be added very easily, check
DataourceMetadataProvidersConfiguration for more details.

Fixes gh-1013
2014-08-29 11:22:11 +02:00
Phillip Webb
f8a4df0838 Polish 2014-08-28 12:07:44 -07:00
Stephane Nicoll
dd6bf5730d Add support for EnableCaching in the cli
Fixes gh-1431
2014-08-28 17:13:16 +02:00
Stephane Nicoll
a0c316d392 Improve RepositoryRestConfiguration customization
This commit binds RepositoryRestConfiguration to the spring.data.rest
prefix so that any of its property can be customized through the
environment.

If a RepositoryRestMvcConfiguration is defined in the context, those
customization do not apply, as it was the case before.

Fixes gh-1171
2014-08-28 16:45:32 +02:00
Stephane Nicoll
aa0f90ec2e Document JMS auto configuration
Fixes gh-1445
2014-08-28 09:52:46 +02:00
Phillip Webb
ff870de0f0 Fix a few JTA issues
- Search for ConnectionFactories in java:/JmsXA and
  java:/XAConnectionFactory
- Remove javax.transaction:jta managed dependency
- Removed unused JtaProperties argument

Fixes gh-947
2014-08-27 10:09:34 -07:00