Commit Graph

183 Commits (d514cc3dabccacd3c6626e594799f0378110619b)

Author SHA1 Message Date
Spring Buildmaster 7e9ed5e1a7 Next Development Version 8 years ago
Phillip Webb 7396ccfe04 Harmonize ConditionOutcome messages
Add ConditionMessage class to help build condition messages in a
uniform format and update existing conditions to use it.

Fixes gh-6756
8 years ago
Spring Buildmaster 334baaeffd Next development version 8 years ago
Andy Wilkinson a6f443a953 Automatically disable DevTools when running a Cucumber test
Closes gh-6412
8 years ago
Andy Wilkinson e9c69f261d Merge branch '1.3.x' 8 years ago
Andy Wilkinson e1950e34c6 Include cause when throwing exception due to unreadable manifest
Closes gh-6417
8 years ago
Phillip Webb 05ff4ed4e0 Upgrade to Tomcat 8.5.4 & remove tomcat-juli
Upgrade the managed Tomcat dependency to 8.5.4 and remove `tomcat-juli`
since it's now included in `tomcat-embed-core`.

Fixes gh-6192
8 years ago
Andy Wilkinson bf618d505c Merge branch '1.3.x 8 years ago
Andy Wilkinson b1dd92881d Retry class file upload to remote application that fails to connect
Closes gh-6339
8 years ago
Andy Wilkinson 8e669e2eef Merge branch '1.3.x 8 years ago
Andy Wilkinson 4963cfd67b Reset thread's interrupted flag when catching InterruptedException
Closes gh-6360
8 years ago
Spring Buildmaster 2216369348 Next Development Version 8 years ago
Andy Wilkinson 92bb24e365 Avoid synchronizing on this and use an internal monitor instead
Where possible, code that previously synchronized on this (or on the
class in the case of static methods) has been updated to use an
internal monitor object instead. This allows the locking model that's
employed to be an implementation detail rather than part of the
class's API.

Classes that override a synchronized method continue to declare
the overriding method as synchronized. This ensures that locking
is consistent across the superclass and its subclass.

Closes gh-6262
9 years ago
Stephane Nicoll 5656e83ba9 Enable logging of resolved exceptions
Previously, if an exception was resolved by a `HandlerExceptionResolver`
nothing the log indicated a failure to process the query.

This commit adds a new property `spring.mvc.log-resolved-exception` that
enables warning logs for supported `HandlerExceptionResolver` instances.

When Devtools is enabled, this flag is enabled by default.

Closes gh-2176
9 years ago
Johnny Lim 301574de09 Polish
Closes gh-6234
9 years ago
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
9 years ago
Phillip Webb c136054e69 Merge branch '1.3.x' 9 years ago
Phillip Webb 5b97981c87 Polish 9 years ago
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
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
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
9 years ago
Phillip Webb e27bc9ddea Merge branch '1.3.x' 9 years ago
Phillip Webb ed6f11d60d Polish 9 years ago
Phillip Webb 99c6194e17 Don't use MockitoJUnitRunner
Replace `@RunWith(MockitoJUnitRunner.class)` with direct Mockito
initialization since the running doesn't support parallel test
execution.
9 years ago
Andy Wilkinson 277ceb7425 Merge branch '1.3.x' 9 years ago
Martin Lippert efd541d26b Check factory method metadata to avoid NPE in devtools condition
Closes gh-6056
9 years ago
Andy Wilkinson a3f4b3c704 Merge branch '1.3.x' 9 years ago
Andy Wilkinson f3e9f1e6e3 Polish FileSystemWatcher and improve its thread safety
- Limit shared state between FileSystemWatcher and the watching thread
- Use a private monitor rather than synchronizing on this
- Use a Runnable implementation rather than subclassing Thread
- Synchronize consistently when reading and writing state

Closes gh-6039
9 years ago
Phillip Webb ccdcad757a Allow template lookup caching to be disabled
Extract TemplateAvailabilityProvider caching logic to a new
TemplateAvailabilityProviders class and provide property support to
disable it. Also update DevToolsPropertyDefaultsPostProcessor to
automatically set the property.

Fixes gh-5989
9 years ago
Andy Wilkinson bda2e766ac Merge branch '1.3.x' 9 years ago
Andy Wilkinson 9f425343ae Make FileSystemWatcherTests thread-safe
The list of changes is written to on one thread and read from on
another. Without some form of sychronization this is not thread-safe.

This commit makes changes a synchronized list which should guarantee
that the reading thread can see the changes made by the writing thread.
It also removes a redundant call to clear the list of changes at the
start of waitsForPollingInterval.

See gh-6038
9 years ago
Phillip Webb 6cdbdf9ad3 Polish 9 years ago
Johnny Lim 7a62b7d066 Polish
Closes gh-5936
9 years ago
Spring Buildmaster 819a9574a6 Next Development Version 9 years ago
Spring Buildmaster 376bbe68d8 Next Development Version 9 years ago
Andy Wilkinson 96d01d6791 Merge branch '1.3.x' 9 years ago
Andy Wilkinson a19eeaf91d DevTools should only shut down single, auto-configured DataSource
Previously, there were two problems with DevTools’ DataSource
auto-configuration:

1. It did not tolerate a context with multiple DataSources
2. It would attempt to shut down a DataSource that had not been created
   by DataSourceAutoConfiguration and, therefore, where we could not be
   sure of its configuration.

This commit updates DevToolsDataSourceAutoConfiguration so that it backs
off unless the context contains DataSourceProperties and a single
DataSource created by DataSourceAutoConfiguration. This ensures that it
can safely use DataSourceProperties to get the DataSource’s
driver class name and accurately determine if it’s an in-memory or
external database. Shutdown is only called for an in-memory database.

Closes gh-5540
9 years ago
Johnny Lim 61b47079a4 Remove duplicate words
Closes gh-5731
9 years ago
Jakub Narloch 64989ae192 Replacing StringBuffer with lock-free StringBuilder
Closes gh-5727
9 years ago
Andy Wilkinson 43256ee7c9 Merge branch '1.3.x' 9 years ago
Andy Wilkinson b554894bb4 Polishing 9 years ago
Andy Wilkinson 1fbd43bdf0 Tolerate jar files with no manifest in ChangeableUrls
Closes gh-5704
9 years ago
Andy Wilkinson 43d30cc5bc Merge branch '1.3.x' 9 years ago
Andy Wilkinson 1412eaa0e0 Handle relative URLs in jar's Class-Path when getting changeable URLs
5e0ba6ea added support for reading a jar manifest's Class-Path
attribute when resolving changeable URLs from a URLClassLoader,
however it did not handle relative URLs, i.e. URLs without a protocol,
correctly.

This commit updates ChangeableUrls so that it uses the URL of the
JAR that contains the manifest as the base for any new URLs that
are created. When the Class-Path entry is relative, this base will
be used. When the Class-Path entry is absolutee, URL's constructor
will ignore the supplied base.

Closes gh-5665
9 years ago
Phillip Webb 8514064d5c Tweak FileSystemWatcherTests timing for Windows 9 years ago
Phillip Webb 6d23ce2ada Polish 9 years ago
Phillip Webb 6550bb4cf1 Polish 9 years ago
Andy Wilkinson 140e86bb97 Merge branch '1.3.x' 9 years ago