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

Push yaml format #6493

Closed
wants to merge 5 commits into from
Closed

Push yaml format #6493

wants to merge 5 commits into from

Conversation

xuancd25
Copy link

通过ConfigService.publishConfig接口推送配置:

原调用推送接口代码:
String content = yaml.dumpAs(gateway, Tag.MAP, null);
configService.publishConfig(prop.getDataId(), prop.getGroup(), content);

只能推送String类型的配置内容,并且不能指定配置内容类型为yaml

现增加type参数:
String content = yaml.dumpAs(gateway, Tag.MAP, null);
configService.publishConfig(prop.getDataId(), prop.getGroup(), content,"yaml");

解决通过此接口推送配置不能推送yaml格式的问题

xuancd25 added 2 commits July 28, 2021 18:38
push 配置时指定内容类型,原推送String格式的yaml时,指定不了格式,导致推送上去没有实现yaml格式
push时,指定不了格式,导致格式为txt文本,添加指定格式接口
@CLAassistant
Copy link

CLAassistant commented Jul 28, 2021

CLA assistant check
All committers have signed the CLA.

@KomachiSion
Copy link
Collaborator

There are some conflicts, Please fix it first.

* @param content content
* @param type type
* @return Whether publish
* @throws NacosException NacosException
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add since annotation like @since 2.1.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add complete

@xuancd25 xuancd25 requested a review from KomachiSion July 29, 2021 06:39
* @param type type
* @return Whether publish
* @throws NacosException NacosException
* @since 1.4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this interface has added in 1.4?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this problem has been solved and does not need to be modified. Please refuse.
Because I found this problem when I used Nacos last August. At that time, this problem had not been solved. For some reasons, I delayed until now to upload my solution.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides, We're all Chinese. Why not communicate in Chinese?Isn't it better for foreigners to learn Chinese,just kidding.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We recommend using English to allow more non-Chinese users to understand the context, but our community does not mandate it.

@KomachiSion
Copy link
Collaborator

Sorry, this problem has been solved and does not need to be modified. Please refuse. Because I found this problem when I used Nacos last August. At that time, this problem had not been solved. For some reasons, I delayed until now to upload my solution.

I will close this PR.

@KomachiSion KomachiSion closed this Aug 2, 2021
@KomachiSion KomachiSion added the status/invalid This doesn't seem right label Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants