You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the org.springframework.cloud:spring-cloud-services-starter-service-registry dependency is added to the CLASSPATH of a Spring Boot application (and specifically, a Spring Boot for Pivotal GemFire (SBDG) application, i.e. org.springframework.geode:spring-gemfire-starter), Pivotal Spring Cloud Services will create a "bootstrap" ApplicationContext with a "bootstrap" Environment.
During the creation of this "bootstrap" ApplicationContext and Environment, specific property sets (aka PropertySources) are copied from the "main" ApplicationContext, Environment object to the "bootstrap" Environment. And, in this particular case, the boot.data.gemfire.cloudcache configuration ProperySource is copied from "main" to "bootstrap". This custom SBDG specific PropertySource contains essential information from the environment/context in which the SBDG app is deploy (e.g. PCF when using PCC). 1 such piece of pertinent information is Authentication credentials extracted from the VCAP environment variables to allow a Spring Boot, Pivotal GemFire cache client application to authenticate with the bound PCC cluster when deployed to PCF.
However, Pivotal Spring Cloud Services is very specific about which PropertySources it collects from the "main" Environment to include in the "bootstrap" Environment. It specifically collects EnumerablePropertySources and later discards them, which then prevents the Spring Boot, Pivotal GemFire cache client application from successfully authenticating with the bound PCC cluster when deployed to PCF.
This enhancement works around this Pivotal Spring Cloud Services behavior (bug?).
The text was updated successfully, but these errors were encountered:
Normally in the `Environment` it is better to let user-defined
properties take precedence, rather than trying to simply omit
them. This change makes the `ClientSecurityAutoConfiguration` rely
on that existing feature, rather than trying to inspect the property
sources manually and add guess which properties are set.
See spring-projects#21
In #22 I show a better way to fix this issue using the existing contract of Environment and the precedence of PropertySources it defines. Feel free to adapt it, or ignore it if your prefer.
When the
org.springframework.cloud:spring-cloud-services-starter-service-registry
dependency is added to the CLASSPATH of a Spring Boot application (and specifically, a Spring Boot for Pivotal GemFire (SBDG) application, i.e.org.springframework.geode:spring-gemfire-starter
), Pivotal Spring Cloud Services will create a "bootstrap"ApplicationContext
with a "bootstrap"Environment
.During the creation of this "bootstrap"
ApplicationContext
andEnvironment
, specific property sets (akaPropertySources
) are copied from the "main"ApplicationContext
,Environment
object to the "bootstrap"Environment
. And, in this particular case, theboot.data.gemfire.cloudcache
configurationProperySource
is copied from "main" to "bootstrap". This custom SBDG specificPropertySource
contains essential information from the environment/context in which the SBDG app is deploy (e.g. PCF when using PCC). 1 such piece of pertinent information is Authentication credentials extracted from the VCAP environment variables to allow a Spring Boot, Pivotal GemFire cache client application to authenticate with the bound PCC cluster when deployed to PCF.However, Pivotal Spring Cloud Services is very specific about which
PropertySources
it collects from the "main"Environment
to include in the "bootstrap"Environment
. It specifically collectsEnumerablePropertySources
and later discards them, which then prevents the Spring Boot, Pivotal GemFire cache client application from successfully authenticating with the bound PCC cluster when deployed to PCF.This enhancement works around this Pivotal Spring Cloud Services behavior (bug?).
The text was updated successfully, but these errors were encountered: