Spring Boot项目整合Apollo错误:for env UNKNOWN from com.ctrip.framework.apollo.internals.DefaultMetaServerProvider
Apollo支持完善的管理界面,支持多环境,配置变更实时生效,权限和配置审计等多种生产级功能
错误信息
App ID is set to appblog-gateway by app.id property from System Property
Environment is set to null. Because it is not available in either (1) JVM system property 'env', (2) OS env variable 'ENV' nor (3) property 'env' from the properties InputStream.
Located meta services from apollo.meta configuration: http://192.168.1.20:8980!
Located meta server address http://192.168.1.20:8980 for env UNKNOWN from com.ctrip.framework.apollo.internals.DefaultMetaServerProvider
解决方案
启动项目时修改配置
-Denv=DEV
-Denv就是开发环境,DEV表示Apollo配置中的环境名称
IDEA配置:Edit Run/Debug Configurations
-> Configuration
-> VM options
配置 -Denv=DEV
Linux服务器启动jar 也需要加上启动参数,例如:java -Denv=DEV -jar appblog.jar
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/24/spring-boot-project-integrate-apollo-error-for-env-unknown-from-com-ctrip-framework-apollo-internals-defaultmetaserverprovider/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
Spring Boot项目整合Apollo错误:for env UNKNOWN from com.ctrip.framework.apollo.internals.DefaultMetaServerProvider
Apollo支持完善的管理界面,支持多环境,配置变更实时生效,权限和配置审计等多种生产级功能
错误信息
App ID is set to appblog-gateway by app.id property……
文章目录
关闭
共有 0 条评论