title: How to add CSS and JS to Spring mvc project
body: <p>I'm working on a project in Spring MVC. I would like to connect CSS and js under it. However, for some reason, spring can not see these files. In the previous project which was configured using XML and everything worked fine. Any suggestion would be helpful.</p>
  
  <p>Project Structure<br>
  <img src="https://i.stack.imgur.com/oNpTt.png" alt=""> </p>
  
  <pre><code>    &lt;script type="text/javascript" src='&lt;spring:url value="/resources/js/script.js"/&gt;'&gt;&lt;/script&gt;
      &lt;link href='&lt;spring:url value="/resources/css/style.css"/&gt;' rel="stylesheet" /&gt;
  </code></pre>
  
  <p><strong>Configuration:</strong></p>
  
  <pre><code>public void addResourceHandlers(final ResourceHandlerRegistry registry){
      registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
  }
  </code></pre>