Commit Graph

8295 Commits (894a8563a598205d511e7c9d5b26427583de8aee)
 

Author SHA1 Message Date
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.
9 years ago
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
9 years ago
Stephane Nicoll 1afb653859 Merge pull request #6185 from izeye:patch-47
* pr/6185:
  Fix default value for dispatch-options-request in doc
9 years ago
Johnny Lim d47719edbd Fix default value for dispatch-options-request in doc
Closes gh-6185
9 years ago
Andy Wilkinson 971913e672 Polish 9 years ago
Stephane Nicoll 3799496dc8 Merge branch '1.3.x' 9 years ago
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
9 years ago
Stephane Nicoll 72b88790f0 Update .gitignore 9 years ago
Andy Wilkinson f5f116d68f Make configuration of lazy session ID generator compatible with Tomcat 7
See gh-6174
9 years ago
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
9 years ago
Stephane Nicoll bce6bd6594 Polish 9 years ago
Stephane Nicoll 7b5df365d8 Enable SSL from MongoClientOptions
Closes gh-5099
9 years ago
Andy Wilkinson fa0a137cd2 Merge branch '1.3.x' 9 years ago
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
9 years ago
Stephane Nicoll 2ff9e3cfdc Upgrade to Hibernate 5.2
See gh-6111
9 years ago
Andy Wilkinson d9d26cba1a Merge branch '1.3.x' 9 years ago
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
9 years ago
Stephane Nicoll a273d8d0c8 Add secured connection support to Artemis
This commit aligns the feature introduced in gh-6071 to Artemis.

Closes gh-6179
9 years ago
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.
9 years ago
Stephane Nicoll 8b79c667a7 Polish "Secured HornetQ" contribution
Closes gh-6071
9 years ago
Stéphane Lagraulet 1aa8f49001 Add a secured connection factory for Hornetq.
See gh-6071
9 years ago
Stephane Nicoll dcf0633394 Merge pull request #6116 from jloisel:patch-1
* pr/6116:
  Upgrade to Elasticsearch 2.3.3
9 years ago
Jerome Loisel 12612e178f Upgrade to Elasticsearch 2.3.3
Closes gh-6116
9 years ago
Stephane Nicoll 6dff1548fa Merge branch '1.3.x' 9 years ago
Stephane Nicoll 6574feea87 Document limitations of logging.pattern.*
Closes gh-5653
9 years ago
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
9 years ago
Andy Wilkinson 7a5880c900 Merge branch '1.3.x' 9 years ago
Andy Wilkinson ec7d6381aa Update RunMojo to fail when forked JVM returned non-zero exit code
Closes gh-6172
9 years ago
Stephane Nicoll bc66377169 Merge pull request #6081 from vpavic:improve-batch-starter
* pr/6081:
  Polish contribution
  Remove HSQLDB dependency from Batch Starter
9 years ago
Stephane Nicoll 888c5d4589 Polish contribution
Closes gh-6081
9 years ago
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
9 years ago
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
9 years ago
Andy Wilkinson af20dc6cc4 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 159ef8f189 Ensure that URL returned from ExplodedArchive.getURL() is encoded
Closes gh-5971
9 years ago
Andy Wilkinson fc78a8de90 Merge branch '1.3.x' 9 years ago
Andy Wilkinson c808de0021 Allow custom repackage task to be used without a global main class
Closes gh-5956
9 years ago
Andy Wilkinson e4f95932cc Merge branch '1.3.x' 9 years ago
Andy Wilkinson 76cd45e76e Fix checkstyle violation: remove unused import 9 years ago
Andy Wilkinson 0203448345 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 5c43a5b7dd Honour custom bean name generator for non-web applications
Closes gh-6160
9 years ago
Andy Wilkinson 7e854d090f Broader attempt at fixing URLStreamHandlerFactory pollution problem
This is a follow-on from d341499 that takes a broader approach to
clearing URLs URLStreamHandlerFactory.

See gh-5290
9 years ago
Andy Wilkinson 6d06411cdc Upgrade to Log4j 2.6.1
Closes gh-6167
9 years ago
Andy Wilkinson d341499c6b Prevent Jetty tests from polluting URL’s URLStreamHandlerFactory
The JVM only allows URL.setURLStreamHandlerFactory to be called once.
This is problematic as the JSP support in embedded Tomcat and embedded
Jetty both call this method.

This commit uses reflection to null out URL’s factory field before and
after the embedded Jetty tests have run. This ensures that they can
run successfully if Tomcat has already installed its factory and that
Tomcat-related tests can also run afterwards.

See gh-5290
9 years ago
Andy Wilkinson 75032c46dc Include Javadoc for devtools, test, and test-autoconfigure in main docs
Closes gh-6149
9 years ago
Andy Wilkinson 6ee6f09503 Fix warnings produced during Javadoc generation 9 years ago
Brian Clozel 8daaf6d93e Merge pull request #5290 from tsachev:gh-367
* pr/5290:
  Support JSPs in Embedded Jetty
9 years ago
Vladimir Tsanev b303b3fe35 Support JSPs in Embedded Jetty
JSPs are now supported in executable WARs with embedded Jetty.

Fixes gh-367
Closes gh-5290
9 years ago
Andy Wilkinson 07d78132a9 Upgrade to Spring Data Hopper SR2
Closes gh-6132
9 years ago
Andy Wilkinson 9bc3722a1e Correct version of Undertow in table of supported embedded containers 9 years ago
Andy Wilkinson ff602e60a0 Change default version of Jetty to 9.3
Closes gh-5825
9 years ago