Commit Graph

425 Commits

Author SHA1 Message Date
spencergibb
4967442474 Re-enables disabled tests.
Fixes gh-1042
2021-11-29 12:14:52 -05:00
spencergibb
e47a3a08ce Temporarily disables tests.
See gh-1042
2021-11-22 14:47:25 -05:00
Tim te Beek
95ce58741d Increase JUnit5 usage (#1020) 2021-10-20 15:42:11 +02:00
干货满满张哈希
bc0d54bfd3 add getter for parent to fix: https://github.com/spring-cloud/spring-cloud-sleuth/issues/2023 (#1012) 2021-09-21 12:28:17 +02:00
qxo
b647ccb86a fix: remove unnecessary code (#1000)
new StandardEnvironment will add systemProperties/systemEnvironment PropertySource within its constructor which we do not need.
**we should not create object which do something we do not want, then undo it**
2021-08-16 10:00:56 -04:00
Olga MaciaszekSharma
d6c9b1583c Fix outdated API calls. 2021-07-15 16:31:00 +02:00
Olga MaciaszekSharma
771907e475 Merge remote-tracking branch 'origin/main' 2021-07-15 16:24:06 +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
Olga MaciaszekSharma
a23bdb8845 Merge remote-tracking branch 'origin/2.2.x' 2021-07-05 16:42:53 +02:00
Olga MaciaszekSharma
f90f11d7b1 Fixes gh-898. 2021-07-05 16:41:57 +02:00
o.gusev
b628338e54 Fixes gh-898
If HikariDataSource bean gets AOP-proxied more than once, the spring-cloud rebind operation doesn't treat it as never-refreshable.
2021-07-05 16:35:16 +02: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
spencergibb
b9c4ac463a adds comment 2021-05-27 11:24:59 -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
fd079e4ec9 Create a new DefaultBootstrapContext if no bootstrap context bean. 2021-05-21 16:37:27 -04:00
spencergibb
9a78893238 don't rely on name for bootstrap context bean 2021-05-21 16:28:59 -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
5928ccd168 Ensure that TextEncryptor can be excluded.
Moves usage of TextEncryptor to TextEncryptorUtils.

Fixes gh-912
2021-03-15 19:49:53 -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
5bbe5331b7 Use existing PropertyUtils.bootstrapEnabled().
This will take into account if the bootstrap marker class is present and bring parity between ConditionalOnBootstrapDisabled and TextEncryptorConfigBootstrapper
2021-01-06 18:07:54 -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
c65dfbca6b Merge remote-tracking branch 'origin/2.2.x'
# Conflicts:
#	docs/src/main/asciidoc/_configprops.adoc
#	spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/LoadBalancerProperties.java
#	spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/core/HealthCheckServiceInstanceListSupplier.java
#	spring-cloud-loadbalancer/src/test/java/org/springframework/cloud/loadbalancer/core/HealthCheckServiceInstanceListSupplierTests.java
2020-12-01 11:31:55 +01:00
Dave Syer
7287a3c767 Re-implement /pause endpoint
A new interface PauseHandler provides a callback for /pause and
/resume. The only implementation provided out of the box is for
Spring Integration's Pausable (so it will work with Spring Cloud
Stream Kafka for instance).

Fixes gh-788
2020-12-01 09:47:59 +00:00
Ralph Goers
4a2e83ea46 Remove URL check that causes loading 401 responses from Spring Cloud Config 2020-10-01 10:35:54 -04:00
Olga Maciaszek-Sharma
00668991a4 Reformat. 2020-09-17 09:44:37 -04:00
Olga Maciaszek-Sharma
034768bc8f Adjust to updates in boot. 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
spencergibb
b6c852c506 Updates to use new BootstrapRegistry for ConfigData 2020-08-21 10:06:13 -04:00
spencergibb
8f8f7d4920 Adds spring-cloud-starter-bootstrap.
This allows users to opt-in to bootstrap via classpath rather than properties.
2020-08-10 15:27:17 -04:00
spencergibb
da469626f4 Updates to use new ConfigDataEnvironmentPostProcessor.applyTo() method 2020-08-06 21:40:10 -04:00
spencergibb
08ca4105ab Replaces usage of ConfigFileApplicationListener with a subclass.
BootstrapConfigFileApplicationListener.java overrides the onApplicationEvent() method to not throw an exception.
2020-08-06 14:17:40 -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
Olga Maciaszek-Sharma
87e5d7a62b Fix execution thread for blocking and adjusts timing
* Fix execution thread for blocking DiscoveryClientServiceInstanceListSupplier.

* Desynchronise HealthCheck and Cache. Add info about using HealthCheck without Cache to docs.

See gh-760
2020-05-27 10:13:55 -04:00
buildmaster
b9a5fabe03 Bumping versions 2020-05-22 16:06:07 +00:00