通过run configuration启动项目

系统通过配置加载路径是通过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 然后将文件拖入进来

posted @ 2017-03-28 08:53  一心行走  阅读(276)  评论(0)    收藏  举报