Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个可以从电梯项目访问的 java 库。java 库需要一些系统属性。我原以为 Props 对象中的值会自动作为系统属性使用,但事实并非如此。有人可以告诉我设置所有属性以便我的 java 库可以访问它们的最佳方法吗?
我想这将是类似的东西
System.setProperties(Props.???)
谢谢德斯
我想最好的方法是将以下行添加到我的 Boot 类中:
Props.props.foreach((p) => System.setProperty(p._1, p._2))