首页 > 编程语言 > 详细

Spring中PropertiesLoaderUtils应用

时间:2020-01-13 14:22:44      阅读:80      评论:0      收藏:0      [点我收藏+]
        FileSystemResource fileSystemResource =new FileSystemResource("D:/home/conf/mail.properties");
        Properties properties = PropertiesLoaderUtils.loadProperties(fileSystemResource);
        System.out.println("从文件系统读:"+properties);


        ClassPathResource classPathResource = new ClassPathResource("jasperreports.properties");
        Properties properties1 = PropertiesLoaderUtils.loadProperties(classPathResource);
        System.out.println("从类路径读:"+properties1);

微信公众号

技术分享图片
JAVA程序猿成长之路
分享资源,记录程序猿成长点滴。专注于Java,Spring,SpringBoot,SpringCloud,分布式,微服务。

Spring中PropertiesLoaderUtils应用

原文:https://www.cnblogs.com/niugang0920/p/12187020.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!