code: private String readSqlFromResource(Resource resource)
    {
  
      try (BufferedReader reader = new BufferedReader(new InputStreamReader(
        new FileInputStream(
          resource.
          getFile()), "UTF-8"));)
      {
        StringBuilder sqlBuf = new StringBuilder();
  
        for (String line = reader.readLine(); line != null; line
          = reader.readLine())
        {
          sqlBuf.append(line).append("\n");
        }
        return sqlBuf.toString();
        }
        catch (IOException e)
        {
          log.error("Couldn't read SQL script from resource file.", e);
          throw new FileAccessException(
            "Couldn't read SQL script from resource file.", e);
        }
    }
docs: Reads the content from a resource into a string.
  @param resource
  @return