Commit Graph

6959 Commits

Author SHA1 Message Date
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
Oliver Gierke e703997be2 Use new projection capabilities in Spring Data Hopper.
Uses interfaces instead of DTOs to implement projections. Works
around DATAJPA-864 [0].

[0] https://jira.spring.io/browse/DATAJPA-864
2016-02-15 15:19:54 +01:00
Stephane Nicoll b205e02e33 Upgrade to Spring Data Hopper M1
Closes gh-5120
2016-02-15 14:57:08 +01:00
Andy Wilkinson 1c365662b0 Don't leave so many threads lying around in the tests
See gh-5141
2016-02-12 17:39:14 +00:00
Andy Wilkinson ae08934e08 There may only be a single restart during RestarterTests.testRestart()
See gh-4097 and changes in 2522a5f
2016-02-12 16:43:15 +00: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 2522a5f9ef Call context.close() rather than shutdown hook in DevTools restart
Previously, when DevTools was restarting the application it would
use reflection to run all of the JVM's shutdown hooks. This was done
to close any SpringApplications' application contexts. Unfortunately,
it had the unwanted side-effect of running other shutdown hooks as
well.

The other shutdown hooks were often written with the, entirely
reasonable, expectation that they would only be called when the JVM
was shutting down. Calling them at another time could leave the
hook's library in an unexpected state. One such example is Log4J2
which was worked around in aaae4aa3 (see gh-4279). Another is the
problem with Eureka (see gh-4097). There's no work around for this
problem, even with reflective hackery, hence the change being made
here.

This commit updates the Restarter so that shutdown hooks are no longer
called during a restart. This removes the chance of a restart having
the unwanted side-effect of leaving a third-party library in a broken
state. RestartApplicationListener now prepares the Restarter with the
root application context, and the Restarter then closes it as part of
the restart. The changes have been tested with an application that
uses a single context and an application with a context hierarchy.

Closes gh-4097
2016-02-12 15:12:01 +00:00
Andy Wilkinson 6e3faecce6 Merge branch '1.3.x' 2016-02-12 13:18:02 +00:00
Andy Wilkinson 1c170b35ea Improve handling of connection failures in remote debug tunnel
Previously, if an application had been started without remote
debugging enabled, an attempt to connect to it via
RemoteSpringApplication and the HTTP tunnel would result in the
application being hammered by connection attempts for 30 seconds.

This commit updates the tunnel server to respond with Service
Unavailable (503) when a connection attempt is made and the JVM
does not have remote debugging enabled. When the client receives a
503 response, it now logs a warning message describing the possible
problem before closing the connection.

The client has also been updated to provide improved diagnostics when
a connection to the tunnel server cannot be established, for example
because the remote URL is incorrect, or the remote application isn't
running.

Lastly, the client has been updated so that it continues to accept
connections when a connection to the server is closed. This allows
the user to correct a problem with the remote application, such as
restarting it with remote debugging enabled, without having to also
restart the process that's running RemoteSpringApplication.

Closes gh-5021
2016-02-12 12:50:58 +00:00
Andy Wilkinson 11c9068d53 Merge branch '1.3.x' 2016-02-12 10:31:02 +00:00
Andy Wilkinson 607dba97f8 Only access parameters in WebRequestTraceFilter when they are included
Previously, WebRequestTraceFilter would call request.getParameterMap()
before deciding whether or not the parameters should be included in
the trace. For a POST request, this had the unwanted side-effect
of always reading the request body.

This commit updates WebRequestTraceFilter so that it checks that
parameters are to be included in the trace before calling
request.getParameterMap()

Closes gh-5089
2016-02-12 10:26:23 +00:00
Andy Wilkinson 0641d9af4f Merge branch '1.3.x' 2016-02-12 10:18:02 +00:00
Andy Wilkinson 815da8b845 Upgrade to Tomcat 8.0.32
Closes gh-5122
2016-02-12 10:17:09 +00:00
Andy Wilkinson 9836d6ef89 Merge branch '1.3.x' 2016-02-12 09:39:19 +00:00
Andy Wilkinson ac5c6f725c Correct the scope of the postgresql dependency in spring-boot-devtools 2016-02-12 09:39:05 +00:00
Andy Wilkinson 2cee11620e Merge branch '1.3.x' 2016-02-11 19:40:04 +00:00
Andy Wilkinson 295dc65b78 Fix LoggingSystem tests following System property changes 2016-02-11 19:38:47 +00:00
Andy Wilkinson 2be90eca98 Merge branch '1.3.x' 2016-02-11 18:02:07 +00:00
Andy Wilkinson 7787321db4 Polishing 2016-02-11 18:02:04 +00:00
Andy Wilkinson 72928de518 Merge branch '1.3.x' 2016-02-11 18:00:10 +00:00
Andy Wilkinson ddfadce94d Set all documented system properties in LoggingApplicationListener
Closes gh-5073
2016-02-11 17:52:16 +00:00
Stephane Nicoll f3c622ad89 Merge branch '1.3.x' 2016-02-11 17:52:57 +01:00
Stephane Nicoll 4cbbd48f18 Polish documentation
Closes gh-5131
2016-02-11 17:52:38 +01:00
Andy Wilkinson 3894ff84e3 Merge branch '1.3.x' 2016-02-11 16:28:28 +00:00
Andy Wilkinson 31aa5ad8dd Remove redundant public modifier 2016-02-11 16:28:15 +00:00
Andy Wilkinson f3aa236e92 Merge branch '1.3.x' 2016-02-11 16:01:29 +00:00
Andy Wilkinson a8f4708ffb Shut down in-memory database when DevTools restarts the context
Previously an in-memory database that wasn’t pooled (an
EmbeddedDatabase) would be shutdown when the context restarted, but
an in-memory database wrapped in a connection pool was not. This meant
that the former would be be wiped clean after each restart, whereas the
latter would not. In addition to being inconsistent, this also
caused problems with schema.sql and data.sql scripts when using
DevTools. If you were using an in-memory database wrapped in a
connection pool, a failure may occur during a restart as the scripts
were not being run against in clean database.

This commit adds an auto-configured bean to DevTools that, when the
context is being closed, will execute “SHUTDOWN” if it identifies that
the DataSource is not an EmbeddedDatabase and is for an in-memory
database.

Closes gh-4699
2016-02-11 16:01:07 +00:00
Stephane Nicoll 187d26ae10 Merge branch '1.3.x' 2016-02-11 17:00:16 +01:00
Stephane Nicoll abf9d66edf Document how to configure access logging
Also, the section on `server.*` configuration was poor so this commit
also improves it.

Closes gh-4989
2016-02-11 16:59:47 +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
Stephane Nicoll 63d9f9e91f Merge branch '1.3.x' 2016-02-11 14:49:35 +01:00
Stephane Nicoll 594c8910c5 Clarify precedence of property sources
When the `locations` attribute is set for a given bean annotated with
`@ConfigurationProperties`, the configuration at these specified
locations take precedence over any other property sources. This means
that such values can't be overridden by a system property or a command
line switch for instance.

This commit clarifies this rules in the documentation.

Closes gh-5111
2016-02-11 14:49:11 +01:00
Andy Wilkinson a754e63e46 Merge pull request #5162 from Kazuki Shimizu
* gh-5126:
  Auto-configure ResourceUrlEncodingFilter when using FreeMarker
2016-02-11 11:34:29 +00: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
Andy Wilkinson 4597b61626 Merge branch '1.3.x' 2016-02-10 12:05:33 +00:00
Andy Wilkinson ec8f7d3a0f Upgrade to SLF4J 1.7.15
Closes gh-5044
2016-02-10 12:05:14 +00:00
Andy Wilkinson 9c40d43a72 Merge branch '1.3.x' 2016-02-10 11:34:00 +00:00
Andy Wilkinson aab678f499 Upgrade to Undertow 1.3.17.Final
Closes gh-5108
2016-02-10 11:33:48 +00:00
Stephane Nicoll b82fb5e5a6 Merge branch '1.3.x' 2016-02-10 11:44:08 +01:00
Stephane Nicoll 6710c05750 Document `DeprecatedConfigurationProperty`
Closes gh-5118
2016-02-10 11:43:37 +01:00