Commit Graph

8130 Commits

Author SHA1 Message Date
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
Andy Wilkinson 76cd45e76e Fix checkstyle violation: remove unused import 2016-06-15 17:21:08 +01:00
Andy Wilkinson 0203448345 Merge branch '1.3.x' 2016-06-15 16:56:40 +01:00
Andy Wilkinson 5c43a5b7dd Honour custom bean name generator for non-web applications
Closes gh-6160
2016-06-15 16:55:53 +01:00
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
2016-06-15 16:46:17 +01:00
Andy Wilkinson 6d06411cdc Upgrade to Log4j 2.6.1
Closes gh-6167
2016-06-15 16:21:46 +01:00
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
2016-06-15 16:17:30 +01:00
Andy Wilkinson 75032c46dc Include Javadoc for devtools, test, and test-autoconfigure in main docs
Closes gh-6149
2016-06-15 15:21:14 +01:00
Andy Wilkinson 6ee6f09503 Fix warnings produced during Javadoc generation 2016-06-15 15:21:14 +01:00
Brian Clozel 8daaf6d93e Merge pull request #5290 from tsachev:gh-367
* pr/5290:
  Support JSPs in Embedded Jetty
2016-06-15 16:02:33 +02:00
Vladimir Tsanev b303b3fe35 Support JSPs in Embedded Jetty
JSPs are now supported in executable WARs with embedded Jetty.

Fixes gh-367
Closes gh-5290
2016-06-15 16:01:54 +02:00
Andy Wilkinson 07d78132a9 Upgrade to Spring Data Hopper SR2
Closes gh-6132
2016-06-15 14:15:08 +01:00
Andy Wilkinson 9bc3722a1e Correct version of Undertow in table of supported embedded containers 2016-06-15 13:58:48 +01:00
Andy Wilkinson ff602e60a0 Change default version of Jetty to 9.3
Closes gh-5825
2016-06-15 13:58:47 +01:00
Andy Wilkinson e1cafb16ba Ignore check goal of duplicate-finder-maven-plugin in Eclipse
See gh-6163
2016-06-14 16:02:22 +01:00
Andy Wilkinson d839e1ec00 Remove redundant restart-compatible Redis serializer
Previously, Spring Data Redis assumed that the class loader that loaded
its classes would also be able to load the application’s classes. This
assumption is faulty when there are multiple class loaders involved
such as when using dev tools or when Spring Data Redis is installed as
a shared library in a servlet container.

DATAREDIS-427 and DATAREDIS-501 removed this assumption by making the
default serialiser use the bean class loader. DevTools configures this
class loader to be the restart class loader which can load the
application’s classes. As a result of moving to Hopper SR2 snapshots,
these fixes are now available and we can remove our custom serialised.

Closes gh-5760
2016-06-14 15:46:27 +01:00
Stephane Nicoll 1b252c3e82 Merge branch '1.3.x' 2016-06-14 14:25:19 +02:00
Stephane Nicoll ed2586d38d Upgrade Apache HTTP components to 4.4.5
Closes gh-6165
2016-06-14 14:24:03 +02:00
Andy Wilkinson c5d8eec033 Verify that starters do not pull in duplicate classes and resources
Closes gh-6163
2016-06-14 12:40:12 +01:00
Andy Wilkinson 82c0f5dcdf Update Jersey starter to depend on single copy of Tiger Types classes
Closes gh-6162
2016-06-14 12:40:11 +01:00
Andy Wilkinson f2be37e60b Update Security starter to depend on single copy of AOP Alliance classes
As of Spring Framework 4.3, spring-aop now embeds the classes from the
aopalliance:aopalliance jar. This means that the transitive dependency
on aopalliance:aopalliance is redundant and it can be excluded.

Closes gh-6159
2016-06-14 12:40:11 +01:00
Andy Wilkinson 32f694be06 Update Data MongoDB starter to depend on single Mongo driver artifact
Closes gh-6161
2016-06-14 12:40:11 +01:00
Andy Wilkinson 1c8ede44ba Update Narayana JTA starter to depend on single JTA API artifact
Closes gh-6158
2016-06-14 12:40:02 +01:00
Andy Wilkinson f21354dd87 Update Data JPA starter to depend on single JTA API artifact
Closes gh-6157
2016-06-14 12:37:10 +01:00
Andy Wilkinson f4d197c245 Make Jest available to javadoc generation
See gh-6032
2016-06-14 12:37:10 +01:00
Dave Syer a3b29b0e42 Add /webjars/** to default list of unsecured resources
Fixes gh-2460
2016-06-14 10:31:39 +01:00
Dave Syer 9e8beb7323 Merge remote-tracking branch 'origin/1.3.x' 2016-06-14 09:56:18 +01:00
Dave Syer 6b6f4e2263 Fix JSON syntax
(according to Eclipse it was broken)
2016-06-14 09:56:00 +01:00
Dave Syer e4b544bd39 Create PID_FOLDER if it doesn't exist
In fact the folder was already created if the app is running as
a different user, but not if running as the current user, so it
was just a question of moving one line out of an if block.

Fixes gh-5986
2016-06-14 09:54:58 +01:00