Assuming a spring app with an application.properties file containing
Current behavior (kotlin for example)
@Topic(name = "/api/banana", pubsubName = "\${pubsubProp}") // pubsubName treated as literal string: \${pubsubProp}
@PostMapping("/api/banana")
suspend fun doItAgain(ce: CloudEvent) {
// stuff
}
Proposed behavior (kotlin for example)
@Topic(name = "/api/banana", pubsubName = "\${pubsubProp}") // resolves to "banana"
@PostMapping("/api/banana")
suspend fun doItAgain(ce: CloudEvent) {
// stuff
}
Proposed method
This could be achieved by modifying the DaprBeanPostProcessor class to evaluate the attribute value with an EmbeddedValueResolver with the spring context.
This would also support other SPEL, e.g.: ${pubsubProp:defaultValue}, etc.
Assuming a spring app with an
application.propertiesfile containingCurrent behavior (kotlin for example)
Proposed behavior (kotlin for example)
Proposed method
This could be achieved by modifying the
DaprBeanPostProcessorclass to evaluate the attribute value with anEmbeddedValueResolverwith the spring context.This would also support other SPEL, e.g.:
${pubsubProp:defaultValue}, etc.