//spring方式
Resource resource = new ClassPathResource("application.properties");
String path = ((ClassPathResource) resource).getURL().getPath();
System.out.println(path);
//jdk方式
String path2 = (new App()).getClass().getResource("/").getPath();
FileInputStream inputStream = new FileInputStream(path2 + "application.properties");
Properties properties = new Properties();
properties.load(inputStream);
System.out.println(path2);