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

gateway读取nacos路由配置有bug,附修复方法 #4762

Closed
lq-java opened this issue Mar 29, 2023 · 0 comments
Closed

gateway读取nacos路由配置有bug,附修复方法 #4762

lq-java opened this issue Mar 29, 2023 · 0 comments

Comments

@lq-java
Copy link

lq-java commented Mar 29, 2023

版本号:3.5.0
问题描述:nacos中配置带group配置的话,gateway读取路由配置文件会读取不到,
截图&代码:

我在parent里pom.xmll里配置了group=dev,这是gateway的application.yml
image
但是看下GatewayRoutersConfig里这两处代码,注释是原本的代码,命名空间读取的是服务注册的分组,这个明显是不对的,我服务注册没分组,没配置,配置文件分组了,这里会默认去读取DEFAULT_GROUP的配置,就会出错。
image

另外上面那处代码,我目前是在nacos上的jeecg-gateway-dev.yaml里增加了group配置,是可以的,但是感觉这里可以统一读取项目启动配置文件中spring.cloud.nacos.config.group的值就可以,他们原本就是一个分组

image

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能;
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

No branches or pull requests

2 participants