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

请教env加载的优先级问题 #569

Closed
lyg123 opened this issue Mar 15, 2017 · 2 comments
Closed

请教env加载的优先级问题 #569

lyg123 opened this issue Mar 15, 2017 · 2 comments

Comments

@lyg123
Copy link

lyg123 commented Mar 15, 2017

env加载的优先级是怎样的
我看日志是
[framework-foundation] /opt/settings/server.properties does not exist or is not readable.
[framework-foundation] C:/opt/settings/server.properties does not exist or is not readable.
[framework-foundation] JVM system property 'env' is blank. Will try to get environment by OS environment variable 'ENV'.
[framework-foundation] Environment is set to [fat] by OS env variable 'ENV'.
是否是先从server.properties->jvm->environment variable
这样的顺序?

@lyg123 lyg123 changed the title 请教env的一个问题 请教env加载的优先级问题 Mar 15, 2017
@nobodyiam
Copy link
Member

nobodyiam commented Mar 15, 2017

顺序是system property(jvm) -> environment variable -> server.properties

具体的可以参考framework foundation的source file,具体类名是com.ctrip.framework.foundation.internals.provider.DefaultServerProvider

@lyg123
Copy link
Author

lyg123 commented Mar 16, 2017

好的,谢谢!

@lyg123 lyg123 closed this as completed Mar 16, 2017
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