This new feature add a lowest arg spring.config.intergration-location with value 'classpath*:' support. In some cases, we integrate jars with an uncertain number, such as message subscribers. This new feature can make message sending truly dynamic and zero configuration for providers
Comment From: pivotal-issuemaster
@stategen Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@stategen Thank you for signing the Contributor License Agreement!
Comment From: philwebb
Thanks for the pull-request, but this is quite a substantial set of changes and we won't be able to apply them in their current form. We have an open issue (#24688) to discuss the idea of jars contributing additional properties, could you please add your use-case to that issue.
There's a lot of potential gotchas with adding wildcard imports so we're taking some time to think about the design.
Comment From: stategen
thanks for your replies, my case is as this :
project B is the spring-stream consumer recieves mq from project A
classpath:/sink/B/application.yml:
spring.cloud.stream:
function.definition: supplier;methodB1;methodB2...n;
bindings:
methodB1-in-0.destination: methodB1-dest
methodB2-in-0.destination: methodB2-dest
...
methodBn-in-0.destination: methodBn-dest
project C is the spring-stream consumer recieves mq from project A
classpath:/sink/C/application.yml:
spring.cloud.stream:
function.definition: supplier;methodC1;methodC2...n;
bindings:
methodC1-in-0.destination: methodC1-dest
methodC2-in-0.destination: methodC2-dest
...
methodCn-in-0.destination: methodCn-dest
...
project N is the spring-stream consumer recieves mq from project A
project A's config will sync manual summary with B,C...N'config like below:
classpath:/application.yml:
spring.cloud.stream:
function.definition: methodB1;methodB2...n,methodC1;methodC2...n,...methodN1;methodN2...n;
bindings:
methodB1-in-0.destination: methodB1-dest
methodB2-in-0.destination: methodB2-dest
...
methodBn-in-0.destination: methodBn-dest
methodC1-in-0.destination: methodC1-dest
methodC2-in-0.destination: methodC2-dest
...
methodCn-in-0.destination: methodCn-dest
...
the work is hard,hard,hard and never stable,never never never stop!
Now Now Now with my this update. project B ,C,...N only facade a itself jar with config as below
--spring.config.intergration-location=classpath*:/sink/*/[application.yml]
//rule: lowest order and can be overrided by any, not care conflicts,not overrides higher value, limit 2 wildcards ,endswith '*/' or file and filtered by /sink/ ,so not slow,
classpath:/sink/N/application.yml:
spring.cloud.stream:
function.map:
methodN1: true
methodN2: true
...
methodN2: true
bindings:
methodN1-in-0.destination: methodN1-dest
methodN2-in-0.destination: methodN2-dest
...
methodNn-in-0.destination: methodNn-dest
auto join spring.cloud.stream.function.map's keySet as it's onwer spring.cloud.stream.function.definition
project A do nothing but hold the arg,
--spring.config.intergration-location=classpath*:/sink/*/[application.yml]
auto join or plus spring.cloud.stream.function.map's keySet as it's onwer spring.cloud.stream.function.definition project A can override classpath:/sink//[application.yml] configs any time,any way.
Perfect!
Comment From: stategen
@philwebb ,the github'editor musk some chars or changed the style I typed,if need ,i can create a demo from my real from my real projects?
Comment From: philwebb
@stategen I tried to edit your comment. Take a look at https://guides.github.com/features/mastering-markdown/ for instructions on how to format your comments. I think a sample would certainly help.
Comment From: stategen
@philwebb ,nice format!