Commit Graph

8158 Commits

Author SHA1 Message Date
Andy Wilkinson
2c8eaac78c Update documentation of server.server-header for changes in 3009e51
See gh-4730
2016-06-20 15:25:01 +01:00
Andy Wilkinson
3009e5146c Disable Jetty's default Server header
Following the upgrade to Tomcat 8.5, Jetty became the only container
that sends a Server header by default. This commit updates the factory
for Jetty to disable the default Server header bringing it into line
with Tomcat and Undertow.

All three containers continue to support server.server-header which
can be used to configure a custom server header.

Closes gh-4730
2016-06-20 15:15:10 +01:00
Stephane Nicoll
06aa35b9da Clarify usage of EnvironmentPostProcessor
Closes gh-6101
2016-06-20 15:29:38 +02:00
Andy Wilkinson
5e4f84cf46 Allow maximum HTTP header size to be configured when using Jetty 8
Closes gh-6190
2016-06-20 14:12:49 +01:00
Andy Wilkinson
5b688de8da Fix artifact id of new Tomcat 8.0 SSL sample
See gh-6164
2016-06-20 13:50:55 +01:00
Stephane Nicoll
97874a0749 Fix build failure 2016-06-20 14:40:57 +02:00
Andy Wilkinson
f28e3d54c5 Upgrade to Tomcat 8.5.3
This commit changes the default version of Tomcat to 8.5.3 while
also retaining support for Tomcat 8.0 and 7.0. The main difference
in 8.5 is that the ServerSocketFactory abstraction that allowed the
TrustStore and KeyStore to be configured programatically no longer
exists. This logic has been replaced with the use of a custom URL
protocol (springbootssl) that provides access to the key store and
trust store of an SslStoreProvider. In addition to working with 8.5,
this approach has the advantage of also working with 8.0 and 7.0.

Closes gh-6164
2016-06-20 13:27:47 +01:00
Stephane Nicoll
06b81cf16f Use @AliasFor when applicable
This commit adds `@AliasFor` meta-data to annotations that declare an
alias attribute.

`@ConditionalOnProperty` and `@AutoconfigureRestDocs` were not migrated
due to the use of `AnnotationMetadata#getAnnotationAttributes`.

Closes gh-5187
2016-06-20 14:20:16 +02:00
Stephane Nicoll
62a41aeed7 Merge pull request #6188 from izeye:json
* pr/6188:
  Reuse objects in JsonParser implementations
2016-06-20 10:20:25 +02:00
Johnny Lim
25f37da466 Reuse objects in JsonParser implementations
Closes gh-6188
2016-06-20 10:19:50 +02:00
Stephane Nicoll
e383752150 Merge branch '1.3.x' 2016-06-20 10:14:25 +02:00
Stephane Nicoll
e93aa2057b Merge pull request #6184 from artembilan:GH-6183
* pr/6184:
  Fix relaxed binding of SI JMX config
2016-06-20 10:12:02 +02:00
Artem Bilan
3ea84f9e1d Fix relaxed binding of SI JMX config
Instead of using an expression for JMX-related properties, this commit
properly honors relaxed binding.

Closes gh-6184
2016-06-20 10:04:38 +02:00
Stephane Nicoll
976f0a7a80 Fix build failure
Fixing #5939 lead to a build failure as OAuth2 related configuration was
defined twice. This is also related to #5973.
2016-06-20 09:47:41 +02:00
Stephane Nicoll
5407cf5f7a Prevent several registration of the same config pojo
This commit detects case where the same set of keys are exposed several
times and prevents the compilation to complete. Previously, duplicate
keys were silently added to the meta-data.

Closes gh-5939
2016-06-20 09:19:02 +02:00
Stephane Nicoll
1afb653859 Merge pull request #6185 from izeye:patch-47
* pr/6185:
  Fix default value for dispatch-options-request in doc
2016-06-18 12:20:58 +02:00
Johnny Lim
d47719edbd Fix default value for dispatch-options-request in doc
Closes gh-6185
2016-06-18 12:20:16 +02:00
Andy Wilkinson
971913e672 Polish 2016-06-17 21:01:29 +01:00
Stephane Nicoll
3799496dc8 Merge branch '1.3.x' 2016-06-17 17:50:47 +02:00
Stephane Nicoll
9abca48a7f Fix HAL browser entry point with contextPath
Previously, if the `contextPath` of the application wasn't the root, the
HAL browser could not initialize since the `entryPoint` was referring to
an invalid location.

This commit makes sure to take the `contextPath` into account.

Closes gh-5814
2016-06-17 17:49:49 +02:00
Stephane Nicoll
72b88790f0 Update .gitignore 2016-06-17 17:47:29 +02:00
Andy Wilkinson
f5f116d68f Make configuration of lazy session ID generator compatible with Tomcat 7
See gh-6174
2016-06-17 15:53:30 +01:00
Andy Wilkinson
f0ce0e3e72 Defer Tomcat’s session ID generator initialization until it’s needed
By default, Tomcat forces the generation of a session id during startup
to ensure that a SecureRandom instance has been initialized. When there
is a lack of entropy (as is often the case on a newly booted VPS, for
example) this can block for a long time (several minutes in some cases)
causing users to incorrectly believe that their application has hung
during startup. This is particularly problematic for applications that
don't use HTTP sessions as they are paying the startup cost for no
benefit.

This commit address the problem by configuring a custom
SessionIdGenerator that does not initialize itself during startup.
Instead, the initialization is now deferred until a request for a
session id is made.

Closes gh-6174
2016-06-17 15:13:57 +01:00
Stephane Nicoll
bce6bd6594 Polish 2016-06-17 14:35:19 +02:00
Stephane Nicoll
7b5df365d8 Enable SSL from MongoClientOptions
Closes gh-5099
2016-06-17 14:33:40 +02:00
Andy Wilkinson
fa0a137cd2 Merge branch '1.3.x' 2016-06-17 13:16:34 +01:00
Andy Wilkinson
a2446080bc Prevent GC pressure from causing an NPE in SimpleInMemoryRepository
Previously, SimpleInMemoryRepository used a ConcurrentReferenceHashMap
to store its locks. The type of map will discard its entries when the
JVM comes under GC pressure. With the code in its previous form, this
could lead to a NullPointerException when the following occurred:

1. putIfAbsent returned null indicating that a new entry has been added
   to the map
2. GC pressure caused the map to discard the new entry
3. get returned null as the entry has been discard

There are two problems with the existing code:

1. Its usage of a ConcurrentMap is incorrect. The correct usage is:
   a. Call get to see if the map already contains a lock
   b. If the lock is null, create a new one
   c. Call putIfAbsent to add the new lock
   d. If the return value is non-null, another thread has created the
      lock and it should be used. If the return value is null, use the
      new lock created in b.
2. Once the use of ConcurrentMap has been corrected, the fact that it is
   a ConcurrentReferenceHashMap means that different threads could
   access the same value using different locks. This would occur if one
   thread has retrieved a lock from the map and is using it, while GC
   causes the lock to be removed from the map. Another thread then
   attempts to get the lock and, as GC pressure has remove it, a new
   lock is created allowing concurrent access to the same value.

This commit updates the code to use the ConcurrentMap correctly and also
replaces the ConcurrentReferenceHashMap with a ConcurrentHashMap. This
means that the repository will now use slightly more memory but this is
outweighed by the benefits of thread-safe updates and no risk of an NPE.

Closes gh-6115
2016-06-17 13:13:49 +01:00
Stephane Nicoll
2ff9e3cfdc Upgrade to Hibernate 5.2
See gh-6111
2016-06-17 11:14:35 +02:00
Andy Wilkinson
d9d26cba1a Merge branch '1.3.x' 2016-06-17 09:58:45 +01:00
Andy Wilkinson
13635201ff Prevent JVM from exiting with 1 when main thread is only non-daemon
DevTools deliberately throws an uncaught exception on the main thread
as a safe way of causing it to stop processing. This exception is
caught and swallowed by an uncaught exception handler. Unfortunately,
this has the unwanted side-effect of causing the JVM to exit with 1
once all running threads are daemons.

Normally, this isn't a problem. Non-daemon threads, such as those
started by an embedded servlet container, will keep the JVM alive and
restarts of the application context will occur when the user makes to
their application. However, if the user adds DevTools to an
application that doesn't start any non-daemon threads, i.e. it starts,
runs, and then exits, it will exit with 1. This causes both
bootRun in Gradle and spring-boot:run in Maven to report that the
build has failed. While there's no benefit to using DevTools with an
application that behaves in this way, the side-effect of causing the
JVM to exit with 1 is unwanted.

This commit address the problem by updating the uncaught exception
handler to call System.exit(0) if the JVM is going to exit as a
result of the uncaught exception causing the main thread to die. In
other words, if the main thread was the only non-daemon thread, its
death as a result of the uncaught exception will now cause the JVM
to exit with 1 rather than 0. If there are other non-daemon threads
that will keep the JVM alive, the behaviour is unchanged.

Closes gh-5968
2016-06-17 09:55:30 +01:00
Stephane Nicoll
a273d8d0c8 Add secured connection support to Artemis
This commit aligns the feature introduced in gh-6071 to Artemis.

Closes gh-6179
2016-06-17 10:30:43 +02:00
Stephane Nicoll
731d326799 Merge pull request #6071 from stephlag:1.3.x
* pr/6071:
  Polish "Secured HornetQ" contribution
  Add a secured connection factory for Hornetq.
2016-06-16 19:14:00 +02:00
Stephane Nicoll
8b79c667a7 Polish "Secured HornetQ" contribution
Closes gh-6071
2016-06-16 19:09:35 +02:00
Stéphane Lagraulet
1aa8f49001 Add a secured connection factory for Hornetq.
See gh-6071
2016-06-16 17:58:53 +02:00
Stephane Nicoll
dcf0633394 Merge pull request #6116 from jloisel:patch-1
* pr/6116:
  Upgrade to Elasticsearch 2.3.3
2016-06-16 17:43:46 +02:00
Jerome Loisel
12612e178f Upgrade to Elasticsearch 2.3.3
Closes gh-6116
2016-06-16 17:43:21 +02:00
Stephane Nicoll
6dff1548fa Merge branch '1.3.x' 2016-06-16 15:45:49 +02:00
Stephane Nicoll
6574feea87 Document limitations of logging.pattern.*
Closes gh-5653
2016-06-16 15:44:22 +02:00
Stephane Nicoll
d54474b81c Allow locale to be overridden by "Accept-Language"
Previously, when `spring.mvc.locale` was specified, that locale was used
regardless of the client's preferences. This commit adds an extra
`spring.mvc.locale-resolver` property that can control how the locale is
resolved. The default is `ACCEPT_HEADER` but can be set to `FIXED` to
restore the previous behaviour.

Closes gh-6083
2016-06-16 14:48:55 +02:00
Andy Wilkinson
7a5880c900 Merge branch '1.3.x' 2016-06-16 11:36:28 +01:00
Andy Wilkinson
ec7d6381aa Update RunMojo to fail when forked JVM returned non-zero exit code
Closes gh-6172
2016-06-16 11:34:15 +01:00
Stephane Nicoll
bc66377169 Merge pull request #6081 from vpavic:improve-batch-starter
* pr/6081:
  Polish contribution
  Remove HSQLDB dependency from Batch Starter
2016-06-16 11:35:16 +02:00
Stephane Nicoll
888c5d4589 Polish contribution
Closes gh-6081
2016-06-16 11:33:57 +02:00
Vedran Pavic
8e2e493946 Remove HSQLDB dependency from Batch Starter
This commit removes HSQLDB dependency from Batch Starter as most apps
that use Spring Batch will prefer to use a RDBMS of their choice to store
batch metadata.

Additionally, explicit spring-jdbc dependency has been replaced with JDBC
Starter dependency.

See gh-6081
2016-06-16 11:33:57 +02:00
Andy Wilkinson
08dd71a0d7 Remove dependency management for jetty-jsp as it does not exist
Jetty 9.3 no longer has a jetty-jsap artifact and dependency
management for it was removed in ff602e6. It was inadvertently
reintroducved in b303b3f. This commit removes it again.

See gh-5290
See gh-5825
2016-06-16 09:48:30 +01:00
Andy Wilkinson
af20dc6cc4 Merge branch '1.3.x' 2016-06-15 20:52:18 +01:00
Andy Wilkinson
159ef8f189 Ensure that URL returned from ExplodedArchive.getURL() is encoded
Closes gh-5971
2016-06-15 20:47:29 +01:00
Andy Wilkinson
fc78a8de90 Merge branch '1.3.x' 2016-06-15 20:22:56 +01:00
Andy Wilkinson
c808de0021 Allow custom repackage task to be used without a global main class
Closes gh-5956
2016-06-15 20:17:51 +01:00
Andy Wilkinson
e4f95932cc Merge branch '1.3.x' 2016-06-15 17:21:17 +01:00