We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@NacosConfigListener Properties 类型转换失效
Type: bug report
application.yml:
spring: config: import: - nacos:nacos-boot cloud: nacos: config: file-extension: yaml server-addr: 127.0.0.1:8848
code:
@NacosConfigListener(dataId = "nacos-boot",type = ConfigType.YAML) public void onMessage(String configInfo){ log.info("NacosConfigListener#String"+ configInfo); } @NacosConfigListener(dataId = "nacos-boot",type = ConfigType.YAML) public void onMessage1(Properties configInfo){ log.info("NacosConfigListener#Properties"+ configInfo.toString()); }
when changed the config from nacos, output:
2023-01-09 21:06:01.333 INFO 14328 --- [onfigListener-1] c.e.c.controller.TestController : NacosConfigListener#Stringuser: name: test-user age: 99 2023-01-09 21:06:01.578 INFO 14328 --- [ternal.notifier] c.a.c.n.c.NacosConfigDataLoader : [Nacos Config] Load config[dataId=nacos-boot, group=DEFAULT_GROUP] success
expected output:
both NacosConfigListener#String and NacosConfigListener#Properties should be triggerd
spring cloud version : 2021.0.4 springboot version : 2.7.5 nacos version : 2.2.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue Description
@NacosConfigListener Properties 类型转换失效
Type: bug report
Describe what happened (or what feature you want)
application.yml:
code:
when changed the config from nacos,
output:
expected output:
Tell us your environment
spring cloud version : 2021.0.4
springboot version : 2.7.5
nacos version : 2.2.0
The text was updated successfully, but these errors were encountered: