I have a config class with @ConfigurationProperties
as follows. I am able to populate systemConfigMap
from application.yaml in the MyConfig
class as seen below
@ConfigurationProperties(prefix = "my-config")
@ConstructorBinding
@AllArgsConstructor
public class MyConfig {
/**
* A Configuration Map of multiple Systems
*/
private Map<String, SystemConfig> systemConfigMap;
}
the main class as
@EnableConfigurationProperties(MyConfig.class)
public class SpringApp {
public static void main(String[] args) {
SpringApplication.run(SpringApp.class, args);
}
}
The problem is that the generated bean name is my-config-a.b.c.config.MyConfig
, which I am not able to use in payload-expression
on spring integration http inbound gateway
, I guess since it has "-" in it.
How can I specify the bean name for the generated bean MyConfig
?
EDIT : HTTP Gateway Config
<int:channel id="myConfigListChannel" />
<int-http:inbound-gateway request-channel="myConfigListChannel"
path="/data"
error-channel="errorChannel"
supported-methods="GET"
payload-expression="@my-config-a.b.c.config.MyConfig.getSystemConfigMap().values()"
/>
I want to load the systemConfigMap
values when /data
is requested to start processing the flow.