Commit Graph

242 Commits

Author SHA1 Message Date
Tim te Beek
95ce58741d Increase JUnit5 usage (#1020) 2021-10-20 15:42:11 +02:00
spencergibb
cfa273be8f updates javadoc 2021-07-13 17:51:32 -04:00
Robert McNees
ea459cee64 Issue 973 - Update Unit version - spring-cloud-context (#977)
* Upgraded more JUnit test versions
2021-07-12 16:14:49 -04:00
Jonathan Schneider
e1a31619cc Polish @RequestMapping annotations (#979)
Co-authored-by: Moderne <team@moderne.io>

Co-authored-by: Moderne <team@moderne.io>
2021-07-10 17:50:28 -04:00
Spencer Gibb
74a0b68287 Run all EnvironmentPostProcessors on refresh. (#969)
This includes ConfigDataEnvironmentPostProcessors which replaces the static call.

Issue #968 was specifically about the cloud foundry vcap post processor. Previously the DecryptEnvironmentPostProcessor was hard coded in ConfigDataContextRefresher

Fixes gh-968
2021-06-23 15:23:31 -04:00
bberto
65df30f420 fixes gh-953 (#963) 2021-06-01 09:45:00 -04:00
Roberto Paolillo
938fb861d0 Decrypt after config data refresh
Fixes gh-962
Fixes gh-955
2021-05-26 11:42:22 -04:00
spencergibb
9efc70b694 Provide original BootstrapContext to ConfigDataContextRefresher
RefreshBootstrapRegistryInitializer saves the BootstrapContext to the application context so ConfigDataContextRefresher can reuse it during rebind.

This fixes issues where custom beans were created such as RestTemplate or discovery first config server lookup.

Fixes gh-933
2021-05-21 15:01:53 -04:00
spencergibb
cec00606fe moves test away from outputcapture 2021-03-18 17:42:45 -04:00
spencergibb
6e556a5088 put test output in variable 2021-03-18 17:09:07 -04:00
spencergibb
355d3cf5e2 adds debug 2021-03-18 16:56:39 -04:00
spencergibb
a9c88e6f5a Updates tests for java 16 2021-03-18 16:41:17 -04:00
buildmaster
0c0aa00e2d Bumping versions 2021-03-16 16:05:38 +00:00
spencergibb
cde355e5e5 Provides a way to disable DecryptEnvironmentPostProcessor.
Fixes gh-927
2021-03-15 21:33:41 -04:00
spencergibb
3885af8caf Moves bootstrap enabled property to refresh property source.
LegacyContextRefresher used to set `spring.cloud.bootstrap.enabled=true` as a property using the api of `SpringApplicationBuilder`. This change moves the setting of properties for refresh from ContextRefresher to LegacyContextRefresher since they are only applicable there. The bootstrap enabled propery is now set on the refresh property source rather than the api.

Fixes gh-892
2021-03-15 20:27:14 -04:00
spencergibb
da22aed5d8 Move CachedRandomPropertySource to EnvironmentPostProcessor
Previously it was an auto-configuration that only worked in legacy bootstrap mode.

Fixes gh-919
2021-03-08 17:37:42 -05:00
spencergibb
38a3711be7 Retain configured property sources across refresh.
Fixes gh-913
2021-03-08 17:23:05 -05:00
Ian Hu
e42f0987bb Avoid hard-coded SCOPED_TARGET_PREFIX usage. (#811)
Co-authored-by: Spencer Gibb <sgibb@pivotal.io>
2021-02-17 11:34:59 -05:00
spencergibb
eb32ea8f21 Use encrypt.fail-on-error in DecryptEnvironmentPostProcessor
Fixes gh-882
2021-01-11 11:56:36 -05:00
spencergibb
f77a6ec372 Creates DecryptEnvironmentPostProcessor.
This is used if bootstrap and legacy processing are not enabled.

EnvironmentDecryptApplicationInitializer is only is if bootstrap and legacy processing are enabled.

Fixes gh-815
2020-12-20 11:14:36 -05:00
Marcin Grzejszczak
7211cdd2e8 Creates TextEncryptorBindHandler for Binder decryption.
It is registered in TextEncryptorConfigBootstrapper for later use in
other ConfigData implementations.
2020-12-20 11:12:15 -05:00
Olga Maciaszek-Sharma
00668991a4 Reformat. 2020-09-17 09:44:37 -04:00
spencergibb
f9bc96747d Merge branch '2.2.x' 2020-09-15 14:21:47 -04:00
Spencer Gibb
5f92501a0d Performance improvements to NamedContextFactory. (#826)
Fixes gh-825
2020-09-15 14:13:17 -04:00
Spencer Gibb
a183bc709f Use new boot ConfigData framework (#703)
Bootstrap is now opt-in using `spring.config.use-legacy-processing`. Otherwise, bootstrap is left as is.

If bootstrap is disabled, the `ContextRefresher` uses new `ConfigData` framework from boot.

See #608 for original motivation.
2020-08-06 12:54:25 -04:00
spencergibb
7c6c32cb87 Mock property source name 2020-07-31 15:04:39 -04:00
spencergibb
26dae55042 Adds support for non-enumerable property sources in bootstrap.
Fixes gh-724
2020-05-21 17:01:26 -04:00
spencergibb
b59a546ce8 Stops casting RandomPropertySource.
This avoids casting errors if property sources are wrapped.

Fixes gh-757
2020-05-15 11:49:17 -04:00
Olga Maciaszek-Sharma
ad5cb2ebb9 Update license comments. 2020-04-23 15:14:47 +02:00
Ryan Baxter
bea81f7b51 Cherry picking commit 4119a9c 2020-04-02 10:26:24 -04:00
Spencer Gibb
e8952fc66a Updates ContextRefresher to maintain property source ordering. (#705)
Updates the targetName so that property sources maintain ordering from the bootstrap environment where they were refreshed.

Fixes gh-704
2020-03-10 14:57:57 -04:00
Spencer Gibb
69a8cece5f Ensures HikariDataSource is never re-bound.
Removes HikariDataSource from extra-refreshable and adds it to a new property never-refreshable.

ConfigurationPropertiesRebinder now checks that property and does not rebind beans whose class is in never-refreshable.

fixes gh-687
2020-03-03 17:54:58 -05:00
Spencer Gibb
744ad89177 Changes default value of management.endpoint.env.post.enabled to false.
fixes gh-681
2020-01-30 13:11:45 -05:00
Ryan Baxter
cb0a693cc9 merge 2.1.x into 2.2.x 2020-01-28 20:19:31 -05:00
Ryan Baxter
c982cd8798 Merge branch '466' of https://github.com/srempfer/spring-cloud-commons into srempfer-466 2020-01-28 20:15:16 -05:00
Spencer Gibb
55e7ce5103 Migrates to new OutputCaptureRule 2020-01-21 12:45:30 -05:00
Spencer Gibb
8b53f2862a Swaps deprecated ConditionalOnEnabledEndpoint for updated annotation.
Swaps with ConditionalOnAvailableEndpoint
2020-01-21 12:45:30 -05:00
Spencer Gibb
232c7f71d2 Adjusts ordering when override system properties is false. (#670)
This fixes as reversed property source bug.

fixes gh-668
2020-01-15 19:30:45 -05:00
Dave Syer
bfbadec0f0 Prevent listeners being added multiple times on restart
(and at other times potentially - e.g. if 2 contexts share a parent).

Plus some general tidy up on compiler warnings.

Fixes gh-613
2019-12-17 16:31:11 +00:00
Ryan Baxter
e4be432ec4 Merge remote-tracking branch 'origin/2.1.x' 2019-12-13 12:09:24 -05:00
Ryan Baxter
763b6c1711 Add each PropertySource from PropertySourceLocators individually (#652)
* Add each PropertySource from PropertySourceLocators individually instead of as a CompositePropertySource.  Fixes #611
2019-12-13 12:01:23 -05:00
srempfer
70129ecc07 Introduced property 'spring.cloud.bootstrap.additional-location' according to 'spring.config.additional-location' (#466) 2019-12-02 17:34:21 +01:00
Ryan Baxter
18a4227c4e Added proxyBeanMethods = false to configuration classes. Fixes #623 2019-11-14 20:04:28 -05:00
Ryan Baxter
3acbb88756 Merge remote-tracking branch 'origin/2.1.x' 2019-08-22 12:14:50 -04:00
Ryan Baxter
656feb2758 Merge branch '2.1.x' of github.com:spring-cloud/spring-cloud-commons into 2.1.x 2019-08-22 12:11:58 -04:00
Ryan Baxter
e52736cef1 Merge branch 'master' of https://github.com/rhanton/spring-cloud-commons into rhanton-master 2019-08-22 11:42:56 -04:00
Tim Ysewyn
f608dd74a7 Merge branch '2.1.x' 2019-07-26 16:26:49 +02:00
Tim Ysewyn
86650dc215 Updated license header 2019-07-26 15:08:53 +01:00
Tim Ysewyn
c19575b978 Added optimizations to EnvironmentDecryptApplicationInitializer 2019-07-26 15:08:53 +01:00
Olga Maciaszek-Sharma
883eb59d3e Merge branch '2.1.x' 2019-07-16 18:30:54 +02:00