public class Test {
public static void main(String[] args) throws IOException {
Properties properties = new Properties();
// FileReader reader = new FileReader("./test.properties");
// FileReader reader = new FileReader("test.properties");
FileReader reader = new FileReader("G:\\springboot-mybatis\\test.properties");
properties.load(reader);
System.out.println(properties.getProperty("name"));
}
}
三种获取路径的方式
最新推荐文章于 2022-08-01 19:10:00 发布