Commit Graph

221 Commits

Author SHA1 Message Date
Phillip Webb 20d7dd5747 Merge branch '1.5.x' 2016-11-18 17:30:03 -08:00
Phillip Webb 1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
2016-11-18 17:27:54 -08:00
Phillip Webb 9e18021e8c Merge branch '1.4.x' into 1.5.x 2016-11-18 15:59:05 -08:00
Phillip Webb fce17ca6d9 Polish 2016-11-18 15:50:19 -08:00
Andy Wilkinson 9273b1789b Merge branch '1.5.x' 2016-11-18 16:41:22 +00:00
Andy Wilkinson 1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

To allow these changes to be tested, FilteredClassPathRunner has been
enhanced to also support overriding a dependency on the class path.
As a result it has been renamed to ModifiedClassPathRunner. The new
ClassPathOverrides annotation can be used to provide the Maven
coordinates of one or more dependencies that should be resolved and
added to the class path. Such additions are added to the start of
the class path so that they override any existing dependency that
contains the same classes.

Closes gh-6520
2016-11-18 16:39:44 +00:00
Andy Wilkinson 8c80722a70 Merge branch '1.5.x' 2016-11-17 19:56:35 +00:00
Andy Wilkinson bed5155676 Merge branch '1.4.x' into 1.5.x 2016-11-17 19:56:27 +00:00
Andy Wilkinson 5857010dde Polishing: fix Checkstyle warning 2016-11-17 19:55:34 +00:00
Andy Wilkinson 971e5e834c Merge branch '1.5.x' 2016-11-17 19:28:31 +00:00
Andy Wilkinson eff0fc0221 Merge branch '1.4.x' into 1.5.x 2016-11-17 19:28:01 +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
Phillip Webb cb7c0b5031 Merge branch '1.5.x' 2016-11-16 16:06:53 -08:00
Phillip Webb dfd327d68f Polish multiple root contexts in `Restarter`
See gh-7335
See gh-7336
2016-11-16 15:30:38 -08:00
Marius Bogoevici 34fb909b41 Support multiple root contexts in `Restarter`
Update devtools restarter to support multiple application contexts.

Fixes gh-7335
Closes gh-7336
2016-11-16 15:30:38 -08:00
Phillip Webb d8b7d6dfdc Merge branch '1.5.x' 2016-11-15 18:53:54 -08:00
Madhura Bhave e7db7adfb8 Rename ApplicationStartedEvent
Rename `ApplicationStartedEvent` to `ApplicationStartingEvent` to
avoid confusion.

Fixes gh-7381
2016-11-15 15:43:35 -08:00
Spring Buildmaster e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Phillip Webb 1ff1402d9c Merge branch '1.5.x' 2016-11-04 12:27:03 -07:00
Phillip Webb 221feac3ec User random server port in devtools tests
Update `LocalDevToolsAutoConfigurationTests` to ensure that a random
server port is used rather than 8080.

Fixes gh-7268
See gh-7039
2016-11-04 12:24:50 -07:00
Brian Clozel cad3cc4e5d Merge branch '1.5.x' 2016-11-03 11:00:28 +01:00
Brian Clozel 56fa34719d Merge branch '1.4.x' into 1.5.x 2016-11-03 11:00:05 +01: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 98a3ae9ac4 Merge branch '1.5.x' 2016-10-31 23:13:37 -07:00
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07: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
Andy Wilkinson 3eb9397c9d Merge branch '1.5.x' 2016-10-20 21:03:28 +01:00
Andy Wilkinson 570b292df7 Disable JspServlet's development mode by default
This commit switches off the auto-configured JspServlet's
development mode by default. Development mode is then switched on
when DevTools is on the class path.

Closes gh-7039
2016-10-20 21:02:21 +01:00
Stephane Nicoll b95b57dbf5 Merge branch '1.5.x' 2016-10-02 11:08:53 +02:00
Stephane Nicoll e643fc5bd1 Merge branch '1.4.x' into 1.5.x 2016-10-02 11:08:33 +02:00
Johnny Lim 503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Andy Wilkinson 2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
2016-09-29 15:44:36 +01:00
Stephane Nicoll d897bf7354 Merge branch '1.5.x' 2016-09-23 08:00:42 +02:00
Stephane Nicoll 24c2e7d182 Merge branch '1.4.x' into 1.5.x 2016-09-23 08:00:22 +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 9bc77254a7 Start building against Spring Framework 5 snapshot
This commit enables compatibility build against Spring Framework 5.

The Velocity and Guava support that are deprecated in the 1.x line have
been removed and few other classes contain minor change to comply to non
backward compatible changes in Spring Framework 5.

This commit also switches the required java version to 8.

Closes gh-6977
2016-09-21 17:37:02 +02:00
Stephane Nicoll 6643ec3713 Next development version 2016-09-21 17:05:50 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster 7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +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
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