0

System Information

Spring Cloud Data Flow Cloud Foundry: v1.1.0.RELEASE Pivotal Cloud Foundry: v1.7.12 CF Client (Windows): cf.exe version 6.23.1+a70deb3.2017-01-13 cf-v3-plugin: 0.6.7

I have developed a custom source module that connects to a REST API to get incremental changes to data. The offset information is stored in a database table in a connected Postgres.

I have a module options @ConfigurationProperties("salesforce") class that has the properties username and password. However my datasource properties, spring.datasource.* properties also have username and password. Datasource properties are in the spring-configuration-metadata-whitelist.properties file under configuration-properties.names.

SCDF seems to rely on the shortened property form, and not use the configuration prefix, which poses a problem for me in this instance as there is no way to distinguish between the properties.

On deployment of the module it fails with the error.

java.lang.IllegalArgumentException: Ambiguous short form property 'password' could mean any of [spring.datasource.password, salesforce.password]

Other than prefixing the actual property names with something to distinguish them, is there a way to solve this in a more elegant way.

Thank you

1 Answers1

0

No, there isn't ;) (apart from changing the shortname to something else, like user and pwd, of course)

The short aliasing mechanism is really here to help in the 95% cases where there is no collision. Keep in mind this is Data Flow specific, and your real property name is salesforce.password

ebottard
  • 1,997
  • 2
  • 12
  • 14