Spring中PropertiesLoaderUtils应用

        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);

微信公众号
在这里插入图片描述

posted @ 2020-01-13 09:50  盲目的拾荒者  阅读(423)  评论(0编辑  收藏  举报