关于使用springboot生成的war包部署到tomcat下配置读取错误的问题 #1993
Labels
bug
Categorizes issue or PR as related to a bug.
kind/report-problem
Categorizes issue when someone report the problem he/she meeted
使用springboot开发的项目,使用生成war包形式部署到tomcat下,如果部署多个,会出现 后启动的一直读取第一个启动的配置信息,导致配置读取错误或者项目启动失败,例如:
如果A应用先启动,当B启动时,获取的appid是A的appid(即:aa,理论上应该是bb),
通过源码发现,使用spring boot 时会实现
EnvironmentPostProcessor.postProcessEnvironment
方法,其中会将appid等信息通过System.setProperty
设置成进程全局属性,导致此问题,由于在项目中存在多处System.setProperty
设置属性操作,还望在修改此问题时评估其他属性是否有影响。非常感谢!
The text was updated successfully, but these errors were encountered: