Commit Graph

6840 Commits

Author SHA1 Message Date
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
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
815da8b845 Upgrade to Tomcat 8.0.32
Closes gh-5122
2016-02-12 10:17:09 +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
295dc65b78 Fix LoggingSystem tests following System property changes 2016-02-11 19:38:47 +00:00
Andy Wilkinson
7787321db4 Polishing 2016-02-11 18:02:04 +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
4cbbd48f18 Polish documentation
Closes gh-5131
2016-02-11 17:52:38 +01:00
Andy Wilkinson
31aa5ad8dd Remove redundant public modifier 2016-02-11 16:28:15 +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
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
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
c10943c653 Polish Javadoc
Closes gh-4936
2016-02-11 15:05:07 +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
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
ec8f7d3a0f Upgrade to SLF4J 1.7.15
Closes gh-5044
2016-02-10 12:05:14 +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
6710c05750 Document DeprecatedConfigurationProperty
Closes gh-5118
2016-02-10 11:43:37 +01:00
Andy Wilkinson
a1fefb15ba Merge pull request #5059 from Vedran Pavić
* gh-5059:
  Remove Docker container after launch script test execution
2016-02-08 16:14:41 +00:00
Vedran Pavic
6540b1f383 Remove Docker container after launch script test execution
Closes gh-5059
2016-02-08 16:14:35 +00:00
Andy Wilkinson
29c7b93640 Update SpringApplicationBuilder to pass args to parent when it's run
Closes gh-5103
2016-02-08 16:02:03 +00:00
Andy Wilkinson
c0a2c88da1 Stop referring to optional classes in BeanDefinitionLoader’s signature
Previously, BeanDefinitionLoader declared a field of type
GroovyBeanDefinitionReader which is a GroovyObject subclass. This is
problematic as BeanDefinitionLoader is always loaded but Groovy is an
optional dependency. Even on a JVM where class verification is performed
lazily, this can still cause problems if something reflectively tries
to access the class’s declared fields. On a JVM where classes are
verified at load time, it would be impossible to start a Spring Boot
application without having Groovy on the classpath.

This commit changes the field to be a BeanDefinitionReader, removing
the indirect reference to GroovyObject form BeanDefinitionLoader’s
signature. The reader is downcast to a GroovyBeanDefinitionReader in the
body of a method body that will only be invoked when Groovy is on the
classpath.

Closes gh-5040
2016-02-04 13:52:13 +00:00
Phillip Webb
43a5b77256 Ensure logback is reset after test
Update SpringBootJoranConfiguratorTests to ensure that logback
is left in a sane state. Prior to this commit, running all tests
in eclipse would fail due to ErrorPageFilterTests expecting
specific log output.
2016-02-03 20:56:45 -08:00
Karol Rynio
19afae7fe6 Fix typos
Closes gh-5025
2016-02-02 11:23:35 +01:00
Stephane Nicoll
6ea74501e7 Clarify registration of ApplicationListener
Spring Boot fires event very early in the application lifecycle and we
should make crystal clear that a regular `@Bean` registration cannot be
used to register a listener on them.

Closes gh-5061
2016-02-02 08:50:32 +01:00
Stephane Nicoll
74bff1f275 Merge remote-tracking branch 'origin/1.3.x' into 1.3.x 2016-02-02 08:48:37 +01:00
Andy Wilkinson
ee409482b3 Enable the use of formatter off and on tags in Eclipse
This commit enables the use of // @formatter:off and // @formatter:on
to surround lines of code that should not be formatted. It also adds
a code template that can be used to quickly wrap the selected lines
of text with the off and on comments.

Closes gh-5050
2016-01-29 16:05:18 +00:00
Vedran Pavic
93de0d7dc0 Improve systemd service documentation
Closes gh-5041
2016-01-28 11:31:28 +01:00
Stephane Nicoll
135ebb8ded Merge pull request #5013 from izeye/polish-20160123
* pr/5013:
  Polish
2016-01-24 19:13:14 +01:00
Johnny Lim
9a31e02806 Polish
Closes gh-5013
2016-01-24 19:13:01 +01:00
Andy Wilkinson
4c1bb38878 Fix broken locking in Restarter.initialize
Closes gh-4955
2016-01-22 15:21:00 +00:00
Phillip Webb
c77a7e0cba Fixup version numbers following release 2016-01-21 19:18:01 -08:00
Spring Buildmaster
504d3e97ba Next development version 2016-01-21 18:41:30 -08:00
Phillip Webb
6d19d737a4 Downgrade to Spring Web Services 2.2.3
Since 2.2.5 hasn't yet been released we'll need to rollback for our
release.

See gh-4789
2016-01-21 17:40:48 -08:00
Phillip Webb
ebabc63bbb Refine ContextId NAME_PATTERN
Update the ContextIdApplicationContextInitializer default NAME_PATTERN
to favor the developer defined `${spring.application.name}` value over
the deployer defined `${vcap.application.name}`.

Fixes gh-4926
2016-01-21 15:31:33 -08:00
Phillip Webb
fd3e5cf304 Defer disable persistence logic to a listener
Update TomcatEmbeddedServletContainerFactory so that logic to disable
persistent sessions happens after Tomcat's standard Manager creation
logic.

Fixes gh-4543
2016-01-21 15:13:37 -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
Andy Wilkinson
acfae2ebff Upgrade to Spring AMQP 1.5.3.RELEASE
Closes gh-5003
2016-01-21 20:24:03 +00:00
Andy Wilkinson
d1be03fcf0 Upgrade to Postgresql 9.4.1207.jre7
Closes gh-5002
2016-01-21 20:22:06 +00:00
Andy Wilkinson
0ed671cb0e Upgrade to jOOQ 3.7.2
Closes gh-5001
2016-01-21 20:21:26 +00:00
Andy Wilkinson
5a04b58432 Upgrade to ActiveMQ 5.12.2
Closes gh-5000
2016-01-21 20:21:01 +00:00
Andy Wilkinson
7c9ec1de0e Upgrade to Undertow 1.3.14.Final
Closes gh-4999
2016-01-21 20:20:37 +00:00
Andy Wilkinson
46f712ec34 Upgrade to Embedded Mongo 1.50.2
Closes gh-4998
2016-01-21 20:20:17 +00:00
Andy Wilkinson
ffd58dd5c7 Upgrade to Jackson 2.6.5
Closes gh-4997
2016-01-21 20:19:17 +00:00
Andy Wilkinson
d4e44fedc4 Merge branch '1.2.x' 2016-01-21 20:18:38 +00:00
Andy Wilkinson
91c497e8bf Upgrade to AspectJ 1.8.8
Closes gh-4996
2016-01-21 20:17:46 +00:00
Phillip Webb
93c3b22bb4 Merge branch '1.2.x' 2016-01-21 11:14:20 -08:00
Phillip Webb
c71aa32fbb Polish 2016-01-21 10:53:25 -08:00
Phillip Webb
af36bf6864 Remove TODO in FlywayAutoConfiguration
Now tracked by gh-4995
2016-01-21 10:42:33 -08:00