我在传统的 tomcat 服务器中运行本地代码,而在部署到 Kubernetes 时,我的读取资源文件代码不起作用。
我放在nas.txt资源文件夹中。
和
File file = ResourceUtils.getFile("classpath:nas.txt");
//Read File Content
String content = new String(Files.readAllBytes(file.toPath()));
return content;
这是给出"Internal exception has occurred"错误
森林海
慕斯王
相关分类