-
Notifications
You must be signed in to change notification settings - Fork 331
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
服务发现例子中服务提供者的随机端口和预期不一致 #2
Labels
Comments
@listky 这么诡异的问题哈哈,分支是? |
分支是服务发现 service-discovery |
@listky 有趣的问题,server.port配置的端口和tomcat的端口不一致,尚不清楚原因,请教有没有知道的同学 |
应该是服务提供者启动时和@value注入时,都会调用一次RandomValuePropertySource的getRandomValue生成一次随机值导致的问题吧,如果用ApplicationContext.getEnvironment().getProperty(server.port) 测试的话就会发现,每次都会生成一个随机值,想要固定的话,只能手写一个PropertySource了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: