Commit Graph

8377 Commits

Author SHA1 Message Date
Dave Syer 13ceea5bba Fix binary compatibility issue
Existing apps get a NoSuchMethodError before this change because
they were compiled expecting a different signature for the
deprecated FilterRegistrationBean constructor.
2016-06-22 08:46:52 +01:00
Andy Wilkinson 52e8ad4b6b Drop back to Hibernate 5.0.9.Final
The upgrade to Hibernate 5.2.0.Final has provide to be too
problematic to live with. It requires Java 8, is incompatible with
a number of other projects in the Hibernate ecosystem, and it's
unclear for how long it will be maintained. We'd previously used
Hibernate 5.1.0.Final but its maintenance is also unclear with
Hibernate 5.1.1.Final being more than 3 months overdue.

This commit drops back to Hibernate 5.0.9.Final. This has a few
advantages:

- It's Java 7 compatible
- It's had some time to mature and should be reasonably free of
  regressions for those moving from 4.3.x
- It's used in both Wildfly and JBoss EAP so there's a fair chance
  that it will continue to be maintained.

Closes gh-6198
2016-06-21 20:09:21 +01:00
Andy Wilkinson f451de3759 Start building against Spring Framework 4.3.1 snapshots
See gh-6197
2016-06-21 17:12:21 +01:00
Andy Wilkinson e5827f4840 Merge branch '1.3.x' 2016-06-21 15:09:56 +01:00
Dave Syer 867f86a44a Merge remote-tracking branch 'origin/1.3.x' 2016-06-21 15:07:42 +01:00
Andy Wilkinson 6c8f8c9d82 Better diagnotics when ESCF subclass breaks with custom management port
When a custom management.port is used, the child context is configured
with an EmbeddedServletContainerFactory bean that has the same class
as the parent context’s EmbeddedServletContainerFactory bean. This
ensures that the child context uses the same type of embedded container
as its parent when there are multiple embedded containers on the
classpath. It also causes a failure when the custom
EmbeddedServletContainerFactory subclass cannot be instantiated, for
example because it’s an anonymous inner-class.

This commit improves the diagnostics so that we fail fast with an
information exception message when we detect that the embedded servlet
container factory bean’s class cannot be instantiated.

Closes gh-6193
2016-06-21 15:05:00 +01:00
Dave Syer f083447a1b Bump spring-retry to 1.1.3 2016-06-21 14:53:01 +01:00
Andy Wilkinson 02dbd6e4a7 Allow JarURLConnection to be created with a relative URL
Previously, JarURLConnection assumed that that URL with which it was
created would contain the absolute path of the underlying jar file.
This meant that when it was created with a relative URL, it could fail
to find an entry or throw a StringIndexOutOfBoundsException.

This commit updates the logic for normalizing the input URL so that
both absolute and relative URLs are supported.

Closes gh-6109
2016-06-21 11:30:51 +01:00
Stephane Nicoll cdb2c513e9 Merge pull request #6191 from persapiens:jsf-spring-boot-starter
* pr/6191:
  Update libraries supported by jsf-spring-boot-starter
2016-06-21 09:11:07 +02:00
Marcelo Romulo Fernandes c6be546f9a Update libraries supported by jsf-spring-boot-starter
Closes gh-6191
2016-06-21 09:10:24 +02:00
Phillip Webb 7446235ff4 Polish 2016-06-20 20:13:13 -07:00
Phillip Webb c136054e69 Merge branch '1.3.x' 2016-06-20 18:54:01 -07:00
Phillip Webb 5b97981c87 Polish 2016-06-20 18:13:43 -07:00
Andy Wilkinson 0c1cf7315a Fix assertion to use AssertJ 2016-06-20 20:38:16 +01:00
Andy Wilkinson 0b2f912ca2 Merge remote-tracking branch 'local/1.3.x' 2016-06-20 20:24:57 +01:00
Andy Wilkinson 9d194c2d43 Add test to verify binding of a property with all upper-case suffix
See gh-5330
2016-06-20 20:24:41 +01:00
Brian Clozel fa32ce35fb Document workaround for JSP limitation
See gh-2893
2016-06-20 18:00:31 +02:00
Brian Clozel 714ee45ff9 Merge branch '1.3.x' 2016-06-20 17:59:29 +02:00
Brian Clozel c1fcecb415 Document JSP limitation: error page customization
Closes gh-2893
2016-06-20 17:56:30 +02:00
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