title: The STS couldn't understand my hateoas import and report error
body: <p>I was building a RESTful service according to the official tutorial of Spring. I add the dependency as instructed, but the STS(Spring Tool Suite) couldn't figure out my function.</p>
  
  <p>The STS couldn't understand <code>methodOn()</code> or <code>lintTo()</code> and keeps on giving errors,please help me with it.<br>
  <strong>pom.xml</strong></p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-hateoas&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>@GetMapping("/employees/{id}")
  Resource&lt;Employee&gt; one(@PathVariable Long id) {
  
      Employee employee = repository.findById(id)
          .orElseThrow(() -&gt; new EmployeeNotFoundException(id));
  
      return new Resource&lt;&gt;(employee,
          linkTo(methodOn(EmployeeController.class).one(id)).withSelfRel(),
          linkTo(methodOn(EmployeeController.class).all()).withRel("employees"));
  }
  </code></pre>