第一种:Object获取项目中的propertiesInputStream in = Object. class .getResourceAsStream( "comdemoconf.properties" );第