配置文件位置:
读取文件中的内容代码:
Resource resource = new ClassPathResource("/my-application.properties");
Properties properties = PropertiesLoaderUtils.loadProperties(resource);
String name = (String) properties.get("myname"); // myname 为my-application.properties中的键值
System.out.println("输出值。。"+ name);