feat: 导入导出配置支持 .meta 文件,修复 yaml 格式识别问题#288
Open
lly835 wants to merge 1 commit intonacos-group:masterfrom
Open
Conversation
修复 nacos-group#280: nacos 导出的配置文件导入到 r-nacos 时,yaml 格式被识别成 txt。 原因:nacos 导出的 zip 中包含 .meta 文件记录配置类型信息,r-nacos 之前忽略了这些文件。 改动: - 导入:先解析 .meta 文件获取 config type,优先使用 .meta 中的类型,回退到文件扩展名检测 - 导出:为非 text 类型的配置生成 .meta 文件,兼容 nacos 导出格式 - ConfigInfoDto 新增 config_type 字段,导出时携带类型信息
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 #280
问题: nacos 导出的配置文件导入到 r-nacos 时,yaml 格式被识别成 txt。
原因: nacos 导出的 zip 中包含
.meta文件记录配置类型信息(如{"type":"yaml"}),r-nacos 之前忽略了这些文件,仅通过文件扩展名检测类型。改动:
.meta文件获取 config type,优先使用.meta中的类型,回退到文件扩展名检测.meta文件,兼容 nacos 导出格式ConfigInfoDto新增config_type字段,导出时携带类型信息