Commit Graph

27717 Commits

Author SHA1 Message Date
Roy Clarkson
374338e32c Update conditional inclusion of milestone repository
The new Spring version schema does not include a "RELEASE" version.
This commit modifies the Gradle conditional to include the milestone
repository for all milestone and snapshot versions.

See gh-22506
2020-07-23 10:28:19 +01:00
Stephane Nicoll
88e2810801 Merge branch '2.3.x'
Closes gh-22527
2020-07-23 11:07:28 +02:00
Stephane Nicoll
e9a966a0a2 Upgrade to Groovy 2.5.13
Closes gh-22526
2020-07-23 11:06:12 +02:00
Stephane Nicoll
a056eb475a Merge branch '2.2.x' into 2.3.x 2020-07-23 11:02:01 +02:00
Stephane Nicoll
4f3b03afcf Merge branch '2.1.x' into 2.2.x
Closes gh-22525
2020-07-23 11:01:05 +02:00
Stephane Nicoll
0440a9a78c Upgrade to Groovy 2.5.13
Closes gh-22505
2020-07-23 10:55:47 +02:00
Stephane Nicoll
57539e0167 Upgrade Java 15 version in CI image
Closes gh-22513
2020-07-23 09:37:58 +02:00
Stephane Nicoll
f28a8e06fb Upgrade Java 8 version in CI image
Closes gh-22517
2020-07-23 09:36:44 +02:00
Stephane Nicoll
f39b338af4 Merge branch '2.3.x' 2020-07-23 09:36:15 +02:00
Stephane Nicoll
41b7eb158b Upgrade Java 14 version in CI image
Closes gh-22515
2020-07-23 09:35:44 +02:00
Stephane Nicoll
71ec15e851 Upgrade Java 8 version in CI image
Closes gh-22514
2020-07-23 09:35:07 +02:00
Stephane Nicoll
32f17645af Merge branch '2.2.x' into 2.3.x 2020-07-23 09:34:29 +02:00
Stephane Nicoll
458b5690e1 Upgrade Java 14 version in CI image
Closes gh-22516
2020-07-23 09:33:30 +02:00
Stephane Nicoll
a2b797f8b7 Upgrade Java 8 version in CI image
Closes gh-22518
2020-07-23 09:33:03 +02:00
Stephane Nicoll
3d1181ee96 Merge branch '2.1.x' into 2.2.x 2020-07-23 09:31:42 +02:00
Stephane Nicoll
ee37ddd6c0 Upgrade Java 8 version in CI image
Closes gh-22512
2020-07-23 09:31:01 +02:00
Madhura Bhave
3f76eb2097 Add volume mount property source support
Add support for volume mounted directories where the filename becomes
the property key and the file contents becomes the value.

Support is provided via a dedicated `VolumeMountDirectoryPropertySource`
class which can either be used directly, or via a "volumemount:/..."
`spring.config.import` location.

Closes gh-19990

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2020-07-22 21:03:37 -07:00
Madhura Bhave
eee260fc03 Add support for profile groups
Add support for profile groups so that users can combine a number of
fine-grained profiles into a single logical group.

Closes gh-22522
2020-07-22 21:03:37 -07:00
Phillip Webb
8c6c4fa9fa Overhaul "externalized configuration" docs
Update the "externalized configuration" reference documentation
following the recent updates.

Closes gh-22521
2020-07-22 21:03:37 -07:00
Phillip Webb
3352024b1c Provide ConfigFileApplicationListener replacement
Deprecate `ConfigFileApplicationListener` and provide a replacement
mechanism that supports arbitrary config data imports.

This commit updates the following areas:

- Extract `EnvironmentPostProcessor` invocation logic from the
  `ConfigFileApplicationListener` to new dedicated listener. Also
  providing support for `Log` injection.

- Extract `RandomPropertySource` adding logic from the
  `ConfigFileApplicationListener` to a dedicated class.

- Migrate to the recently introduced `DefaultPropertiesPropertySource`
  class when moving the defaultProperties `PropertySource`

- Replace processing logic with a phased approach to ensure that
  profile enablement happens in a distinct phase and that profiles
  can no longer be activated on an ad-hoc basis.

- Provide a more predictable and logical import order for processing
  `application.properties` and `application.yml` files.

- Add support for a `spring.config.import` property which can be used
  to import additional config data. Also provide a pluggable API
  allowing third-parties to resolve and load locations themselves.

- Add `spring.config.activate.on-profile` support which replaces the
  existing `spring.profiles` property.

- Add `spring.config.activate.on-cloud-platform` support which allows
  a config data document to be active only on a given cloud platform.

- Support a `spring.config.use-legacy-processing` property allowing the
  previous processing logic to be used.

Closes gh-22497

Co-authored-by: Madhura Bhave <mbhave@vmware.com>
2020-07-22 21:02:32 -07:00
Phillip Webb
44f18362d3 Add Binder backed CloudPlatform.isEnforced method
Update `CloudPlatform` with a new `isEnforced` method that's backed
by a `Binder` rather than the `Environment`. We'll require this when
we overhaul our external config data processing logic.

Closes gh-22498
2020-07-22 21:00:14 -07:00
Phillip Webb
cd36444641 Extract DefaultPropertiesPropertySource class
Extract `DefaultPropertiesPropertySource` from `SpringApplication` so
that logic can be easily accessed by other classes. Specifically the
property source name and logic to move the source to the end of the
list needs to be called from several places.

Closes gh-22520
2020-07-22 20:58:32 -07:00
Phillip Webb
039fbdfa7c Add DeferredLogFactory support
Add a new `DeferredLogFactory` interface and `DeferredLogs`
implementation that can be used when a `DeferredLog` instance is needed
but the `switchOver` method should be handled elsewhere.

This interface has primarily been added so `EnvironmentPostProcessor`
classes will no longer need to implement `ApplicationEventListener`
just to switch over their logs.

Closes gh-22496
2020-07-22 20:58:31 -07:00
Madhura Bhave
9e9eb90d09 Add multi-document properties file support
Update `OriginTrackedPropertiesLoader` so that it can support
multi-document properties files. These are similar to multi-document
YAML files but use `#---` as the separator.

Closes gh-22495

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2020-07-22 20:58:24 -07:00
Phillip Webb
945e5b9222 Add ConfigurationPropertySource.from method
Add a factory method to `ConfigurationPropertySource` that allows a
single Spring `PropertySource` instance to be adapted.

Closes gh-22494
2020-07-22 20:57:43 -07:00
Phillip Webb
078e146983 Filter empty YAML documents
Update `OriginTrackedYamlLoader` so that empty documents are filtered
from the result. Prior to this commit, our origin wrapper would confuse
the YAML processor and cause empty documents to be included in the Map
with a key of "document" and no value.

Closes gh-22493
2020-07-22 20:57:43 -07:00
Phillip Webb
fdc6e80163 Add trailing escape character test
Update `OriginTrackedPropertiesLoaderTests` to also test that an escape
character can be the last character on a line.
2020-07-22 20:57:36 -07:00
Phillip Webb
2eeffe7931 Add @Name support for value object binding
Update value object binder support so that parameters can be annotated
with `@Name` if a specific property name should be used. Prior to this
commit is was not possible to use Java reserved words as property names.

Closes gh-22492
2020-07-22 18:50:23 -07:00
Phillip Webb
2d3ac4bb2e Polish 2020-07-22 18:50:22 -07:00
Phillip Webb
3d7d9d064c Update copyright year of changed files 2020-07-22 18:50:07 -07:00
Phillip Webb
14c1b0938a Polish 2020-07-22 18:25:27 -07:00
Phillip Webb
da69286838 Merge branch '2.3.x' 2020-07-22 17:39:27 -07:00
Phillip Webb
187d3af7fc Update copyright year of changed files 2020-07-22 17:25:17 -07:00
Phillip Webb
d2a7808098 Polish 2020-07-22 17:25:04 -07:00
Phillip Webb
217b2eff89 Merge branch '2.2.x' into 2.3.x 2020-07-22 17:03:23 -07:00
Phillip Webb
b5e70157dc Update copyright year of changed files 2020-07-22 17:01:36 -07:00
Phillip Webb
51a26a4d5a Polish 2020-07-22 17:01:19 -07:00
Stephane Nicoll
0768ade5cd Merge branch '2.3.x' 2020-07-22 21:38:00 +02:00
Stephane Nicoll
dd615fd9dd Upgrade to Spring Integration 5.3.2
Closes gh-22389
2020-07-22 21:37:39 +02:00
Stephane Nicoll
6e217b4f66 Merge branch '2.2.x' into 2.3.x 2020-07-22 21:36:52 +02:00
Stephane Nicoll
0a756b5337 Merge branch '2.1.x' into 2.2.x 2020-07-22 21:36:21 +02:00
Stephane Nicoll
d9c34d5b84 Upgrade to Spring Integration 5.1.12
Closes gh-22511
2020-07-22 21:35:48 +02:00
Stephane Nicoll
68497649b1 Upgrade to Spring Integration 5.2.8
Closes gh-22385
2020-07-22 21:32:52 +02:00
Stephane Nicoll
bbf481ed1c Merge branch '2.3.x' 2020-07-22 20:38:13 +02:00
Stephane Nicoll
fb56483015 Upgrade to Spring Kafka 2.5.4
Closes gh-22390
2020-07-22 20:37:48 +02:00
Stephane Nicoll
f70670935d Merge branch '2.2.x' into 2.3.x 2020-07-22 20:37:03 +02:00
Stephane Nicoll
d1f9adc189 Upgrade to Spring Kafka 2.3.10
Closes gh-22386
2020-07-22 20:36:14 +02:00
Stephane Nicoll
cedd9c58ba Merge branch '2.3.x' 2020-07-22 18:47:38 +02:00
Stephane Nicoll
155f8a1a88 Upgrade to Spring AMQP 2.2.9
Closes gh-22387
2020-07-22 18:44:52 +02:00
Stephane Nicoll
eed4370d47 Merge branch '2.2.x' into 2.3.x 2020-07-22 18:44:10 +02:00