Commit Graph

1933 Commits

Author SHA1 Message Date
Stephane Nicoll
4e3d0f5b33 Fix parsing of value with comma
Closes gh-12297
2018-03-01 17:26:20 +01:00
Andy Wilkinson
452492183d Polish
Closes gh-11991
2018-02-28 14:48:11 +00:00
Andy Wilkinson
88423c504b Polish "Fix handling of static resource jars with spaces in their paths"
Closes gh-11991
2018-02-28 10:40:43 +00:00
Rupert Madden-Abbott
9cd1a4b07a Fix handling of static resource jars with spaces in their paths
See gh-11991
2018-02-28 09:46:29 +00:00
Andy Wilkinson
eaf3789540 Polish "Set host when creating Jetty SSL connector"
Closes gh-12120
2018-02-27 14:39:59 +00:00
mtrejo
f0905ffaf6 Set host when creating Jetty SSL connector
See gh-12120
2018-02-27 14:39:45 +00:00
Phillip Webb
98f58caeaf Reset default local after test completes 2018-02-26 22:22:21 -08:00
Phillip Webb
8f9c067a92 Polish 2018-02-26 22:16:08 -08:00
Madhura Bhave
257e324bd5 Add tests for binding to enum with different locale
See gh-12213
2018-02-26 12:28:28 -08:00
Stephane Nicoll
b4a7e1d64b Use toLowerCase() and toUpperCase() with Locale.ENGLISH
This commit updates all `toLowerCase()` and `toUpperCase` invocations to
use the variant that takes a `Locale` to avoid locale-specific side
effect.

Closes gh-12213
2018-02-26 17:49:03 +01:00
Stephane Nicoll
3db5c70b58 Make sure binder properly resolve resources
This commit makes sure that `@ConfigurationProperties` binding resolves
resources properly. In particular, any `ProtocolResolver` registered on
the `ApplicationContext` is now honoured.

Closes gh-11569
2018-02-20 14:10:22 +01:00
Andy Wilkinson
145d8d2673 Defer removal of Connectors until after ServletContext initialization
Previously, we removed the Connectors from Tomcat's Service before
the Context was started. The removal of the Connectors is required as
it prevents Tomcat from accepting requests before we're ready to
handle them.

Part of starting the Context is creating and initializing the
ServletContext. ServerProperties uses a ServletContextInitializer to
set the session tracking modes and Tomcat rejects the SSL tracking
mode if there is no SSL-enabled connector available. With the previous
arrangement this led to a failure as the Connectors had been removed
so the SSL-enabled connector could not be found.

This commit updates the embedded Tomcat container to defer the
removal of the Connectors until after the context has been started
but still at a point that is before the Connectors themselves would
have been started.

Closes gh-12058
2018-02-14 17:04:55 +00:00
Stephane Nicoll
2f6d05dc51 Fix parsing of String value in json
Closes gh-11992
2018-02-12 17:05:32 +01:00
Stephane Nicoll
da01744e4c Merge pull request #11981 from eiselems:1.5.xMysqlValidationQuery
* pr/11981:
  Update MySQL validation query to use lightweight ping
  Polish
  Reinject mocks when context is dirtied before each method
  Polish “Prevent reverse name lookup when configuring Jetty's address”
  Prevent reverse name lookup when configuring Jetty's address
  Fixup version numbers following release
  Next Development Version
  Protect against symlink attacks
  All CLI support for Windows MINGW environments
  Polish
2018-02-10 15:05:58 +01:00
Marcus Eisele
37ce1784ab Update MySQL validation query to use lightweight ping
Closes gh-11981
2018-02-10 15:04:29 +01:00
Andy Wilkinson
dc1e1e8280 Polish “Prevent reverse name lookup when configuring Jetty's address”
Closes gh-11889
2018-02-10 15:03:53 +01:00
Henrich Kraemer
dc48a90184 Prevent reverse name lookup when configuring Jetty's address
Previously, the host on Jetty's connector was configured using the
host address of the InetSocketAddress. This could result in reverse
name resolution that could cause Jetty to bind to a different IP
address than was configured.

This commit updates the configuration code to use the host string
when specifically does not perform reverse name resolution.

See gh-11889
2018-02-10 15:03:53 +01:00
Spring Buildmaster
aa6cb9744b Next Development Version 2018-02-10 15:03:53 +01:00
Phillip Webb
af8e155c6d Polish 2018-02-10 15:03:53 +01:00
Phillip Webb
798522d890 Format with Eclipse Oxygen SR2 2018-02-08 15:46:49 -08:00
Andy Wilkinson
a1b823fc43 Polish “Prevent reverse name lookup when configuring Jetty's address”
Closes gh-11889
2018-02-02 14:55:57 +00:00
Henrich Kraemer
2066fa7d0b Prevent reverse name lookup when configuring Jetty's address
Previously, the host on Jetty's connector was configured using the
host address of the InetSocketAddress. This could result in reverse
name resolution that could cause Jetty to bind to a different IP
address than was configured.

This commit updates the configuration code to use the host string
when specifically does not perform reverse name resolution.

See gh-11889
2018-02-02 14:44:17 +00:00
Spring Buildmaster
6414b42335 Next Development Version 2018-01-30 23:29:33 +00:00
Phillip Webb
61f7bd8576 Polish 2018-01-30 12:37:40 -08:00
Andy Wilkinson
4ecc7b9211 Polish 2018-01-29 20:10:29 +00:00
Andy Wilkinson
5a74f63f7c Polish "Configure ErrorReportValve not to report stack traces"
Closes gh-11790
2018-01-29 19:50:07 +00:00
Alex Panchenko
29736e340e Configure ErrorReportValve not to report stack traces
See gh-11790
2018-01-29 17:23:49 +00:00
Andy Wilkinson
b6576fbe9c Test compression defaults against 8.5.24 as they changed in 8.5.27
See gh-11727
2018-01-22 21:00:13 +00:00
Phillip Webb
8e783cdae9 Polish 2018-01-18 21:42:11 -08:00
Stephane Nicoll
08ec3d2735 Improve class condition check
This commit improves a class condition check on the actual
implementation rather than the general purpose interface.

Closes gh-11608
2018-01-16 11:09:56 +01:00
Brian Clozel
966d4251a4 Warn against custom request factories in RestTemplateBuilder
This commit adds a javadoc note about a usability issue described in
gh-11255. While `RestTemplateBuilder` is an immutable class, providing a
custom instance of request factory and deriving several
builders/templates from that point may have some unexpected behavior,
since that instance is shared amongst builders instances.

This issue is fixed in Spring Boot 2.0 with a replacement method that
leverages a `Supplier<ClientHttpRequestFactory>` instead.

See gh-11255
2018-01-05 16:24:34 +01:00
Brian Clozel
88b15baf20 Upgrade to Jetty 9.4.8.v20171121
Closes gh-11469
2018-01-02 16:06:45 +01:00
Phillip Webb
2aa3295675 Deprecate inapplicable RegistrationBean methods
Inherit and deprecate RegistrationBean methods that are not applicable
to a ServletListenerRegistrationBean.

Fixes gh-11342
2017-12-13 12:21:57 -08:00
Phillip Webb
2c429ba77d Restore static final formatting
Restore static final constants to upper case formatting.

See gh-10457
2017-12-13 12:21:57 -08:00
Stephane Nicoll
d920b49ba1 Polish
See gh-11193
2017-11-29 10:47:09 +01:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Andy Wilkinson
c14f5fb6ad Polish "Fix handling of spaces in container's document root"
Closes gh-10706
2017-11-23 14:08:00 +00:00
Ali Kord
8031a1bdb4 Fix handling of spaces in container's document root
See gh-10706
2017-11-23 14:01:21 +00:00
Andy Wilkinson
5cf2e76377 Set PID system property before *_LOG_PATTERN system properties
Previously, the PID system property was set after the
CONSOLE_LOG_PATTERN and FILE_LOG_PATTERN system properties. This meant
that the values of the pattern system properties could not reference
the PID system property, i.e. ${PID} would not resolve.

This commit sets the PID system property before the *_LOG_PATTERN
system properties, thereby allowing the latter to reference the
former.

Closes gh-10594
2017-11-23 12:34:00 +00:00
Andy Wilkinson
054ce2865c Protect against partial visibility of Bean Validation API
On WebSphere Liberty, the javax.validation package may be visible but
other javax.validation packages upon which it depends may not be
visible. This can lead to an incorrect assumption that the Bean
Validation API is available when, in fact, it is only partially
available.

Add an additional check for the availability of a class in the
javax.validation.bootstrap package to ensure that it's not just the
javax.validation package that's available.

Closes gh-10877
2017-11-03 14:40:32 +00:00
dreis2211
605e95145a Fix typos in ApplicationArguments and Library
Closes gh-10811
2017-10-30 16:30:56 +01:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Sebastian Thomschke
7441d6bd86 Honor logging.path config in filePattern for Log4j2 RollingFile
Previously, rolled over files were always written to logs/. This
commit ensures that rotated logs are written into the directory
specified in the application config's logging.path property.

Closes gh-10554
2017-10-12 14:39:21 +01:00
Andy Wilkinson
c44b912fc2 Ensure that Undertow is stopped when it fails to start
Previously, if Undertow failed to start, some of Undertow's
internal components would have been started but the started field of
UndertowEmbeddedServletContainer remained false. This meant that when
stop() was called nothing was done as the container believed it had
not been started.

This commit updates UndertowEmbeddedServletContainer to stop both the
DeploymentManager and the Undertow instance in start() if an exception
is thrown. This aligns the behaviour of
UndertowEmbeddedServletContainer with that of the Tomcat equivalent.

Closes gh-10528
2017-10-11 13:30:53 +01:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Andy Wilkinson
858b092a87 Make servlet context property source available before refresh
Previously, when deploying a Spring Boot application to a container,
the servlet context property source was not fully initialised until
the context was refreshed. This led to a problem where a value from a
property source with lower precedence would be seen during the early
stages of the application starting. Once the servlet context property
source had been initialized, its value for the property would then
become visible effectively making it appear as if the property's
value had changed during startup. This led to a specific problem
with determining active profiles.

If spring.profiles.active was set both in JNDI and via the servlet
context both profiles would end up being active, rather than the
more intuitive behaviour of the profiles made active via the servlet
context overriding those made active via JNDI.

This commit updates SpringBootServletInitializer so that it explicitly
creates the StandardServletEnvironment and initializes its property
sources using the servlet context. This is done before the application
is created and run, thereby ensuring that the servlet context
property source is available throughout the application's startup.

Closes gh-9972
2017-10-02 12:38:59 +01:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Andy Wilkinson
beb257f452 Rework JettyEmbeddedErrorHandler to support Jetty 8
Closes gh-10175
2017-09-06 09:51:22 +01:00
Paul Vorbach
04ca7f137d Identify and fix incomplete assertions
Several calls to assertThat lacked a following assertion most often due
to wrong use of parenthesis.

See gh-10084
2017-08-29 13:49:28 +02:00
Stephane Nicoll
83eee7e65d Fix XA DataSource class name for Firebird
Closes gh-10102
2017-08-29 13:48:57 +02:00