Java web项目读取tomcat下的properties或xml配置文件 本地读取资源文件服务器(Tomca读取资源文件File file = new File("src/main/resources/properties/friend.properties");InputStream in = new FileInputStream(file);在blog.csdn.net上查看更多信息更多内容请查看https://blog.csdn.net/friend365/article/details/90802310