Closed WindSearcher closed 1 year ago
能给一个期望的例子吗?不是很理解
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
这样的又是如何映射过来,像notifyItems本身是一个数组,官网只有@Value和@RefreshScope
试试实现一个config类包含数组对象,监听ConfigurationChangedEvent事件,根据事件里面的key,刷新内容,可以参考:https://github.com/chengyouling/spring-cloud-huawei-samples/blob/master/basic/consumer/src/main/java/com/huaweicloud/samples/consumer/ConfigListen.java
List<XXXModel> models
这种情况spring是可以自动映射的。 在yaml里面可以配置成你给的例子。
还是没太理解你的问题在什么地方。
Describe the bug A clear and concise description of what the bug is.
To Reproduce Sample code:
Expected behavior A clear and concise description of what you expected to happen.
Information
Spring Cloud Huawei version: Spring Cloud version(optional): Spring Boot version(optional): Spring version(optional):
Additional context Add any other context about the problem here.