title: ClassNotFoundException: org.springframework.hateoas.Resource even though I have the dependency added
body: <p>I have the following in my pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.hateoas&lt;/groupId&gt;
      &lt;artifactId&gt;spring-hateoas&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>But I still get the following message</p>
  
  <pre><code>Caused by: java.lang.NoClassDefFoundError: org/springframework/hateoas/Resource
      at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_191]
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_191]
      at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_191]
      at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:668) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      ... 21 common frames omitted
  Caused by: java.lang.ClassNotFoundException: org.springframework.hateoas.Resource
      at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_191]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_191]
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_191]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_191]
      ... 25 common frames omitted
  </code></pre>
  
  <p>I tried deleting the contents of the <code>.m2</code> folder and downloading all the dependencies again. I tried force updating the maven project, but I still get the message when I start the Spring Boot project. Anyone know why I'm getting this even though I have added the dependency?</p>