1

There are two business sub projects using Spring Cloud Function. They will be bundled to one Spring Boot Application. Is it possible to declare spring.cloud.function.definition property multiple times in different property files like below?

Project A:

spring:
  cloud:
    function:
      definition: AProducer;AConsumer
    bindings:
      ...

Project B:

spring:
  cloud:
    function:
      definition: BProducer;BConsumer
    bindings:
      ...

If it's not possible, how to handle such use case?

Zouyiu Ng
  • 193
  • 1
  • 12
  • i have the same issue, looked for a solution everywhere but i couldn't found anything, please did you find any solution for this use case? – amir elhajjam Feb 10 '23 at 15:00

1 Answers1

0

you can use profile for handle this type of overriding application config properties.

if you use last version of spring-cloud you have to use spring.config.activate.on-profile

if you use previous version of spring-cloud you can use -Dspring.profiles.active=dev for more information visit this link

in both of these ways : you should have different files in application-${profile-name}.properties or if you are using .yml file you can have single file with multiple profiles. you can separate different profile with --- sign.

Alireza Khajavi
  • 146
  • 1
  • 10