properties获取xml文件的信息语句。
public class SQLUtil {/** * 加载.properties配置文件 * * @param file * @return */ public static Properties loadConfig(String file) {Properties properties = new Properties(); try { properties.load(ClassLoader.getSystemResourceAsStream(file)); return properties; } catch (IOException e) { throw new RuntimeException(e); } }}
浙公网安备 33010602011771号