<p>I am running local code in traditional tomcat server where as while deploying to Kubernetes my code of read resource file is not working. </p>

<p>I placed <code>nas.txt</code> in resource folder.</p>

<p>and </p>

<pre><code>File file = ResourceUtils.getFile("classpath:nas.txt");

//Read File Content
String content = new String(Files.readAllBytes(file.toPath()));
return content;
</code></pre>

<p>This is giving <code>"Internal exception has occurred"</code> error</p>

Hearaman
<p>Is the file present in tomcat - - >webapps  -->app°war--> resources inside the container</p>
