Open innerpeacez opened 6 years ago
系统环境怎么配置会覆盖这里啊?
是的,我debug进去看了,系统的用户名覆盖了,系统用户名字段也是username
这个我还有点疑惑,两台电脑,一台电脑遇到了,一台没有遇到这个问题
可以看看出问题的那台环境变量是怎么配置的吗?
配置了一个USERNAME
这是由于在 scca-plugin-git项目中,对SccaGitProperties 即使用了 @Value 和 @ConfigurationProperties。跟踪发现,首次加载时,有进入正确的值。但生成bean注入到容器中时,由于 @ConfigurationProperties 是松散语法,匹配到了 username这个变量。 应该是用法不对导致的。 将 SccaPluginGitConfiguration 修改为 @Import(SccaGitProperties.class) 可正常使用。
git方式部署在阿里服务上,一直在pending,i然后报错504,是因为username 的原因吗
spring注入bean的时候,获取了系统环境(SystemEnvironment)覆盖了从配置文件中读取到的git的username。我这边是修改了(SccaGitProperties类中的的字段名)。