java(包括springboot)读取resources下文件方式

方式1 使用项目内路径读取,该路径只在开发工具中显示,相似:src/main/resources/resource.properties。只能在开发工具中使用,部署以后没法读取。(不通用)java File file = new File(“src/main/resources/resource.properties”);linux @Test public void testReadFile2(
相关文章
相关标签/搜索