Commit Graph

212 Commits

Author SHA1 Message Date
Andy Wilkinson
baec3d6e8e Merge branch '1.3.x' into 1.4.x 2019-03-27 12:22:40 +00:00
Spring Operator
e401d02ced Use HTTPS for external links wherever possible
See gh-16316
2019-03-27 11:35:54 +00:00
Andy Wilkinson
6920c39349 Merge branch '1.3.x' into 1.4.x 2019-03-20 15:06:50 +00:00
Andy Wilkinson
0e009ef047 Use HTTPS to link to the Apache license 2019-03-20 15:00:10 +00:00
Spring Operator
e2837843e1 Update build and setup configuration to use HTTPS
See gh-16244
2019-03-19 16:44:10 +00:00
Spring Operator
7c314122f7 Update build and setup configuration to use HTTPS
See gh-16243
2019-03-19 16:01:05 +00:00
Spring Buildmaster
88e43c8421 Next Development Version 2017-06-08 09:52:43 +00:00
Spring Buildmaster
d719d2cbbc Next Development Version 2017-04-20 12:46:19 +00:00
Andy Wilkinson
492aee9cea Remove unused optional dependency
It should have been removed in 2522a5f9ef
2017-04-07 14:16:44 +01:00
Andy Wilkinson
ceb80614e5 Polishing 2017-04-07 14:13:55 +01:00
Andy Wilkinson
60505a4fae Don't shut down "in-memory" DB running as a server on DevTools restart
Closes gh-8702
2017-04-07 13:47:40 +01:00
Andy Wilkinson
47de05b52c Update Devtools to ignore manifest Class-Path entries that do not exist
Closes gh-8623
2017-04-04 12:15:51 +01:00
Spring Buildmaster
2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Spring Buildmaster
ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Andy Wilkinson
6a0fb8e44c Update DevTools' ResourceLoader to delegate to user's custom loader
Previously, when DevTools' was used it would set the application
context's ResourceLoader and overwrite any custom ResourceLoader that
had been configured. On the rare occasion when the user had customized
the ResourceLoader this meant that the customization was lost and
certain resources would become unavailable.

This commit updates DevTools' ResourceLoader to delegate a custom
ResourceLoader if one has been configured. If one has not been
configured it delegates as before, i.e. to
WebApplicationContextResourceLoader for web applications and to
DefaultResourceLoader for all others apps.

Closes gh-8010
2017-01-19 09:28:09 +00:00
Andy Wilkinson
69320180d9 Make FileSystemWatcherTests.waitsForPollingInterval more robust
The intent of the test is to:

1. Make a change
2. Sleep for long enough for that change to be picked up
3. Make another change
4. Stop that watcher after 1 further scan has been performed
5. Assert that a further scan was performed by checking that two
   separate sets of changes (step 1 and step 3) have been picked up

Previously, step 2 relied on simply sleeping for a period of time
longer than the polling interval. In reality, the polling interval
is only a minimum time between scans and the actual time between them
depends on thread scheduling, GC pauses, etc. This lead to the
test failing intermittently if the scan didn't happen in a timely
manner.

This commit removes the sleep and replaces it with a while loop that
waits for first change to be picked up. This ensures that the second
change will be detected separately from the first and that two
separate change sets should always be available once the watcher has
stopped.

See gh-7782
2017-01-17 10:30:47 +00:00
Phillip Webb
61c931943f Fix Devtools PatternResolver Servlet support
Update ClassLoaderFilesResourcePatternResolver to support servlet
resources when it's being used with a WebApplicationContext.

Prior to commit 918e122ddc a `ResourceLoader` was not added to the
`ApplicationContext`, meaning that servlet resources could be found by
virtue of the protected `getResourceByPath()` method. Following commit
918e122ddc, the context `ResourceLoader` is set, meaning that all calls
to `getResource` delegate to the `ResourceLoader` and the
`ApplicationContext` methods are not invoked. Since the devtools
`ResourceLoader` wasn't Servlet aware, servlet resources could not
be found.

Fixes gh-7752
2016-12-28 14:25:11 -08:00
Spring Buildmaster
9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb
bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Phillip Webb
fce17ca6d9 Polish 2016-11-18 15:50:19 -08:00
Andy Wilkinson
5857010dde Polishing: fix Checkstyle warning 2016-11-17 19:55:34 +00:00
Andy Wilkinson
918e122ddc Fix remote DevTools' support for adding and removing classes
Previously, remote DevTools only correctly supported modifying
existing classes. New classes that were added would be missed, and
deleted classes could cause a failure as they would be found by
component scanning but hidden by RestartClassLoader.

This commit introduces a DevTools-specific ResourcePatternResolver
that is installed as the application context's resource loader. This
custom resolver is aware of the files that have been added and
deleted and modifies the result returned from getResource and
getResources accordingly.

New intergration tests have been introduced to verify DevTools'
behaviour. The tests cover four scenarios:

- Adding a new controller
- Removing an existing controller
- Adding a request mapping to a controller
- Removing a request mapping from a controller

These four scenarios are tested with:

- DevTools updating a local application
- DevTools updating a remote application packaged in a jar file
- DevTools updating a remote application that's been exploded

Closes gh-7379
2016-11-17 19:19:54 +00:00
Spring Buildmaster
e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Craig Andrews
fc535fe27c Disable resource chain cache when DevTools is enabled
If the resource chain is used, such as by using the
`"spring.resources.chain.strategy.content.enabled"` property,
resource chain caching can prevent the developer from seeing
changes made to resources, so that caching should be disabled
when DevTools is enabled.

This commit sets the `"spring.resources.chain.cache"` property
to `true` when devtools is enabled.
2016-11-03 10:44:32 +01:00
Phillip Webb
cecc1c8817 Disable DevTools property defaults in production
Update `DevToolsPropertyDefaultsPostProcessor` so that property defaults
are only added at development time. Properties are now added only when
`Restarter` is initialize or remote devtools is enabled.

Fixes gh-7014
2016-10-31 20:55:05 -07:00
Johnny Lim
503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Craig Andrews
d94eedfd8a Exclude META-INF/build-info.properties from restart
Prior to this commit any application configured to write
`META-INF/build-info.properties` could trigger unexpected application
restarts. The problem is particularly prevalent when using Eclipse M2E in
combination with Maven's `spring-boot-maven-plugin` `build-info` goal
and Gradle's `springBoot` `buildInfo()`.

Closes gh-7002
2016-09-23 07:58:39 +02:00
Stephane Nicoll
6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster
5f959b074f Next Development Version 2016-09-20 20:20:06 +00:00
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
2016-09-07 10:50:39 -07:00
Spring Buildmaster
334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Spring Buildmaster
a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Andy Wilkinson
a6f443a953 Automatically disable DevTools when running a Cucumber test
Closes gh-6412
2016-07-19 09:54:37 +01:00
Andy Wilkinson
e9c69f261d Merge branch '1.3.x' 2016-07-19 08:55:45 +01:00
Andy Wilkinson
e1950e34c6 Include cause when throwing exception due to unreadable manifest
Closes gh-6417
2016-07-19 08:48:04 +01:00
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
2016-07-18 17:52:35 -07:00
Andy Wilkinson
bf618d505c Merge branch '1.3.x 2016-07-13 10:38:03 +01:00
Andy Wilkinson
b1dd92881d Retry class file upload to remote application that fails to connect
Closes gh-6339
2016-07-13 10:35:42 +01:00
Andy Wilkinson
8e669e2eef Merge branch '1.3.x 2016-07-11 17:03:16 +01:00
Andy Wilkinson
4963cfd67b Reset thread's interrupted flag when catching InterruptedException
Closes gh-6360
2016-07-11 16:46:05 +01:00
Spring Buildmaster
2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
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
2016-07-01 10:44:23 +01:00
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
2016-06-27 14:37:44 +02:00
Johnny Lim
301574de09 Polish
Closes gh-6234
2016-06-27 14:19:26 +02: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
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
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
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