系统通过配置加载路径是通过classpath加载绝对路径

设置属性
选中某个项目,然后在工具栏中选择"Run-->Run Confgurations“,
然后在对话框的右边选择"Arguments,然后在VM arguments中输入-Dproperty.name=value,
这样,在你的代码中使用System.getProperty(property.name)即可以获取value的值。
-Dconf=config/
-Dservicetype=ActivitiService

ps -ef|grep serviceType

-Dlog4j.configuration=log4j.properties

快速获取文件的的系统绝对路径:打开运行窗口winds+R 然后将文件拖入进来

相关文章:

  • 2021-12-31
  • 2021-09-20
  • 2022-12-23
  • 2021-10-31
  • 2021-11-16
  • 2022-12-23
  • 2021-05-03
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2021-08-10
  • 2021-05-06
  • 2022-12-23
  • 2021-09-19
  • 2021-11-19
相关资源
相似解决方案