title: Spring Files.readString() does not work with Maven set to Java 11
body: <p>Trying to write a simple application that reads a file and prints out the file's content. I read that Java 11 has Java.io.file library so I used it. I created a .txt file locally.</p>
  <p>My main class looks like this:</p>
  <pre><code>package com.iz.backend;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.web.bind.annotation.RequestMapping;
  import java.io.IOException;
  import java.nio.file.Files;
  import java.nio.file.Paths;
  import java.nio.file.Path;
  import javax.swing.text.AbstractDocument.Content;
  
  @SpringBootApplication
  public class BackendApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(BackendApplication.class, args);        
      
          Path filePath = Paths.get(&quot;/Users/iz/Proj/backend/src/testFile.txt&quot;);
  
          try
          {
              String content = Files.readString(filePath);
  
              System.out.println(content);
          } 
          catch (IOException e) 
          {
              e.printStackTrace();
          }
      }
  } 
  </code></pre>
  <p>When running</p>
  <pre><code>mvn clean install
  </code></pre>
  <p>to compile and build a jar file, I get a compilation error:</p>
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project backend: Compilation failure
  [ERROR] /home/proj/backend/src/main/java/com/iz/backend/BackendApplication.java:[26,34] error: cannot find symbol
  [ERROR] 
  [ERROR] -&gt; [Help 1]
  </code></pre>