读取来自Internet上的.properties文件的属性。
我在 Internet/Online 上有一个.properties文件(您可以说这是一个外部文件)。我想从中读取属性(版本),以更新我的.xml文件中的模块版本。 我搜索了 propertyplaceholderholderconfigurer ,但它被贬低了。还有其他方法吗?
属性文件:
github.dd-core=6.5.2
xml文件:
<modules>
<module>
<name>dd-core-6.5.2</name>
<artifactid>com.dd-core</artifactid>
<version>6.5.2</version>
</module>
</modules>
预期结果:in 版本标签,而不是 6.5.2 我想使用属性 github.dd核在运行时/动态更新版本。谢谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过这里提供的解决方案? propertyPlacePlaceHolderholderConfigurer替代方案
否则,您也许可以研究属性插件,声称可以做类似的事情: https://www.mojojohaus.org/properties-maven-maven-maven-plugin-plugin-plugin/index.htmll
具体:
Did you try the solutions offered here? PropertyPlaceHolderConfigurer Alternative
Otherwise you can perhaps look into the properties plugin, it claims to do a similar thing: https://www.mojohaus.org/properties-maven-plugin/index.html
Specifically: https://www.mojohaus.org/properties-maven-plugin/read-project-properties-mojo.html