900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > java读取properties配置文件路径

java读取properties配置文件路径

时间:2024-01-22 20:07:37

相关推荐

java读取properties配置文件路径

读取properties文件里的某属性

/*** 读取文件库配置文件*/Properties properties = new Properties();InputStream ips = ImageServiceImpl.class.getClassLoader().getResourceAsStream("config.properties");properties.load(ips);String path = properties.getProperty("imagePath");String servicePath = properties.getProperty("imageServicePath");

读取Resource文件夹下的文件

InputStream file = this.getClass().getResourceAsStream("/templates/statistics/templatesfileExcel/阿斯顿.xlsx");

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。