Commit Graph

1598 Commits

Author SHA1 Message Date
Stephane Nicoll 90f0fc6ce3 Harmonize JTA properties
Previously, both Atomikos and Bitronix were bound on the `spring.jta`
namespace which makes very hard to figure out which property belong to
which implementation. Besides, `AtomikosProperties` only exposed public
setter which does not generate any useful meta-data.

This commit moves the external configuration for Atomikos and Bitronix to
`spring.jta.atomikos.properties` and `spring.jta.bitronix.properties`
respectively. It also improves the meta-data support for those two
namespaces.

Closes gh-5165
2016-02-16 16:44:50 +01:00
Stephane Nicoll ff5b05fed9 Override default consistency for Couchbase
Spring Data Couchbase 2.0 sets the default consistency to "update-after"
which is good for performance reason but can be quite confusing. Since
the team has decided to switch to "read-your-own-writes" in 2.1, Spring
Boot already offers the improved default right now.

This commit exposes an additional property that can be used to change
the Couchbase's default consistency.

Closes gh-5159
2016-02-16 14:28:09 +01:00
Stephane Nicoll 64a5cad09a Improve couchbase support
Expose an `auto-index` property that controls if views and indexes
should be created automatically.

Update the sample so that it uses this new property, lowering the manual
steps to make it working on a vanilla couchbase server.

See gh-3498
2016-02-16 11:42:14 +01:00
Stephane Nicoll da3b49e024 Polish contribution
Closes gh-3499
2016-02-16 09:31:50 +01:00
Eddú Meléndez 76f1ca4188 Add Couchbase support
Closes gh-3498
2016-02-16 09:31:50 +01:00
Andy Wilkinson ecf11e0230 Merge branch '1.3.x' 2016-02-15 21:46:06 +00:00
Andy Wilkinson d69e0486c1 Allow Thymeleaf's LayoutDialect to be overridden
Closes gh-5151
2016-02-15 21:27:34 +00:00
Stephane Nicoll b205e02e33 Upgrade to Spring Data Hopper M1
Closes gh-5120
2016-02-15 14:57:08 +01:00
Stephane Nicoll 85cc885fd1 Merge branch '1.3.x' 2016-02-12 16:26:41 +01:00
Stephane Nicoll b726974bca Allow to easily customize ListenerContainerFactory
Previously, if one wants to create a custom `JmsListenerContainerFactory`
or `RabbitListenerContainerFactory`, a bunch of code from the auto-
configuration must be duplicated.

This commit introduces two services to configure such factory for JMS
and AMQP with the same sensible defaults that were applied by the
auto-configufrations.

Closes gh-5138
2016-02-12 16:16:44 +01:00
Andy Wilkinson 3f0686fa7e Merge branch '1.3.x' 2016-02-11 14:27:07 +00:00
Andy Wilkinson fc2e51a773 Preserve ordering when auto-configuring WebSocket MessageConverters
Previously, WebSocketMessagingAutoConfiguration added a single
additional converter. This was a MappingJackson2MessageConverter
configured with the auto-configured ObjectMapper.
AbstractMessageBrokerConfiguration places additional converters before
any of the default converters. This meant that the auto-configuration
had the unwanted side-effect of changing the ordering of the
converters. A MappingJackson2MessageConverter was now first in the
list, whereas, by default, it's last in the list after a
StringMessageConverter and a ByteArrayMessageConverter.

This commit updates WebSocketMessagingAutoConfiguration so that it
switches off the registration of the default converters and registers
a StringMessageConverter, ByteArrayMessageConverter and
MappingJackson2MessageConverter in that order. A test has been
added to verify that the types of these three converters match
the types of the default converters. A second test that verifies
that String responses are converted correctly has also been added
alongside the existing test that verified the behaviour for JSON
responses.

Closes gh-5123
2016-02-11 14:18:24 +00:00
Stephane Nicoll b3069e4d43 Merge branch '1.3.x' 2016-02-11 15:05:55 +01:00
Stephane Nicoll c10943c653 Polish Javadoc
Closes gh-4936
2016-02-11 15:05:07 +01:00
Kazuki Shimizu 4e177eeed7 Auto-configure ResourceUrlEncodingFilter when using FreeMarker
Closes gh-5126
2016-02-11 11:33:57 +00:00
Stephane Nicoll 1f106ddf8c Enable connection validation by default
Hikari and Commons DBCP2 are already validating that the connection is
valid before borrowing it from the pool. This commit makes that behaviour
consistent by enabling that feature for the Tomcat and Commons DBCP data
sources.

Since a validation query is required in those cases, the infrastructure
of `DataSourceHealthIndicator` has been merged in a single place: the
`DatabaseDriver` enum provides not only the driver class names but also
the validation query, if any.

Closes gh-4906
2016-02-11 12:03:18 +01:00
Stephane Nicoll eb7b1ec33c Merge branch '1.3.x' 2016-02-10 14:29:59 +01:00
Stephane Nicoll 2a8a3741f5 Merge DriverClassNameProvider in DatabaseDriver
DriverClassNameProvider is unused but was probably restored by a merge
commit at some point. It wasn't obvious and updated that class rather
than `DatabaseDriver`.

This commit updates `DatabaseDriver` and deletes
`DriverClassNameProvider`.

Closes gh-5076
2016-02-10 14:28:58 +01:00
Phillip Webb 2b18e99ac7 Polish 2016-02-08 11:01:52 -08:00
Stephane Nicoll a27176807f Polish contribution
Closes gh-4188
2016-02-08 15:44:09 +01:00
Eddú Meléndez 5776d6a8d7 Add support of Jackson in Jersey
If Jackson is configured for the project, the `ObjectMapper` is now
reused and added in the Jersey's context.

Closes gh-4131
2016-02-08 15:34:44 +01:00
Phillip Webb a5ae81c1c1 Use AssertJ in spring-boot-autoconfigure
See gh-5083
2016-02-06 15:15:25 -08:00
Phillip Webb 516afcd2ca Polish 2016-02-06 15:02:12 -08:00
Phillip Webb ed01ae9ebf Use deterministic DataSource config import order
Update DataSourceAutoConfiguration so that pooled datasource
configurations are only loaded via an @Import. If left as nested
classes, the load order is JVM specific and can result in the wrong
configuration being loaded.

Closes gh-2183
2016-02-05 11:38:05 -08:00
Phillip Webb 3d0355434c Drop unneeded version tag from POM.xml 2016-02-05 11:37:08 -08:00
Phillip Webb a80ada64c3 Formatting 2016-02-03 12:16:53 -08:00
Vedran Pavic 1bc3eb8f0a Fix MariaDB driver class name
Closes gh-5075
2016-02-03 13:16:04 +01:00
Stephane Nicoll 34d87df425 Clarify use of the `spring.datasource` prefix
Previously, Spring Boot mapped both `DataSourceProperties` and the actual
`DataSource` implementation to the same prefix. This results in a huge
amount of keys in the `spring.datasource` namespace  with no way to
identify those that are valid for the pooled data source in use.

This commit maps the four pooled data sources we support in four isolated
namespace, keeping `spring.datasource` only for the common settings.

These are `spring.datasource.tomcat`, `spring.datasource.hikari`,
`spring.datasource.dbcp` and `spring.datasource.dbcp2` for the Tomcat,
Hikari, Commons DBCP and Commons DBCP2 implementations respectively.

Closes gh-2183
2016-02-03 11:05:23 +01:00
Phillip Webb 26dfbeb8f4 Share MetadataReaderFactory
Add SharedMetadataReaderFactoryContextInitializer to ensure that a
shared caching MetadataReaderFactory is used between configuration
classes and auto-configure sorting.

Fixes gh-4993
2016-01-29 21:42:18 -08:00
Phillip Webb f276ff4bd0 Polish 2016-01-27 16:02:36 -08:00
Stephane Nicoll b02073b455 Polish 2016-01-27 17:12:09 +01:00
Stephane Nicoll 217f825d3d Clarify DataSourceAutoConfiguration
The `DataSource` auto-configuration in Spring Boot supports two modes:
regular pooled DataSource and embedded database (via the
`EmbeddedDatabase` infrastructure provided by `spring-jdbc`. These were
previously named `NonEmbedded` and `Embedded` respectively.

This commit clarifies those mode and in particular that a pooled
`DataSource` can also handle an embedded database.

Closes gh-4634
2016-01-27 17:11:48 +01:00
Stephane Nicoll 762097ef29 Refactor logic from DataSourceProperties
Introduce dedicate method to determine the actual value to use based on
the configuration and the environment.

Closes gh-1436
2016-01-26 16:24:24 +01:00
Stephane Nicoll 3562026e9a Polish contribution
Closes gh-4574
2016-01-26 15:18:32 +01:00
Patrick Bray 3bf6c2fe1f Support for SendGrid ApiKey
See gh-4574
2016-01-26 15:01:19 +01:00
Stephane Nicoll 58751a43c1 Polish contribution
Closes gh-4590
2016-01-26 14:59:38 +01:00
Eddú Meléndez c68ffa5ba0 Add Thymeleaf's Java8TimeDialect
Closes gh-4576
2016-01-26 14:43:10 +01:00
Stephane Nicoll 854a67588e Remove reference to spring.view.*
Closes gh-3278
2016-01-26 08:19:22 +01:00
Stephane Nicoll 8e3d63ab6a Polish contribution
Closes gh-4632
2016-01-25 16:24:20 +01:00
Huang YunKun d796845664 Remove deprecated use of spring.mvc.*
Closes gh-4086
2016-01-25 16:01:05 +01:00
Stephane Nicoll cafe1dc4c6 Polish contribution
Fix additional use of \n

Closes gh-4707
2016-01-25 15:43:04 +01:00
mnhock e0ec607735 Use a platform-specific line separator
See gh-4707
2016-01-25 14:37:38 +01:00
Stephane Nicoll 4ff5afc636 Polish contribution
Removing all deprecated code

Closes gh-4905
Closes gh-4917
2016-01-25 14:06:20 +01:00
Eddú Meléndez 7b9cd20e98 Remove deprecated code
See gh-4905
2016-01-25 14:05:53 +01:00
Phillip Webb fbaf209240 Move master to 1.4.0.BUILD-SNAPSHOT 2016-01-24 10:45:24 -08:00
Johnny Lim 9a31e02806 Polish
Closes gh-5013
2016-01-24 19:13:01 +01:00
Spring Buildmaster 504d3e97ba Next development version 2016-01-21 18:41:30 -08:00
Phillip Webb e520c47c4f Refine `messages.properties` detection
Update `ResourceBundleCondition` to only enable the messages source
if `messages.properties` (and not `messages*.properties`) exists. This
operation is much faster that performing a pattern match since a full
jar entry scan is not required.

Since adding `messages.properties` is good practice and this change
allows us to delete the custom `PathMatchingResourcePatternResolver`
it seems like a fine compromise to make.

Fixes gh-4930
See gh-4811
2016-01-21 15:13:33 -08:00
Phillip Webb cf93f84e87 Polish 2016-01-21 14:15:49 -08:00
Phillip Webb 93c3b22bb4 Merge branch '1.2.x' 2016-01-21 11:14:20 -08:00