Skip to content
New issue

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

NacosPropertySourceConverter support #95

Closed
wants to merge 0 commits into from
Closed

NacosPropertySourceConverter support #95

wants to merge 0 commits into from

Conversation

hylexus
Copy link

@hylexus hylexus commented Jun 13, 2019

enhancement

NacosPropertySourceConverter Support in issues#33

example

  • yaml-based string in NacosServer
job:
  executor:
    app-name: demoJob
  scheduler:
    address: http://localhost:8899/schedule
  • Load PropertySource from yaml-based string
// load property source
@NacosPropertySource(name = "jobConfig", dataId = "job.yml", autoRefreshed = true, first = true, converter = NacosPropertySourceConverter.SimpleYamlConverter.class)
  • Reference in Java
@Value("${job.executor.app-name}")
private String name;

@NacosValue(value = "${job.scheduler.address}", autoRefreshed = true)
private String address;

@hylexus hylexus closed this Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant