title: Spring 5 - How to provide static resources
body: <p>I am trying provide static resources in my web application and I tried:</p>
  
  <pre><code>@SuppressWarnings("deprecation")
  @Bean
  WebMvcConfigurerAdapter configurer(){
      return new WebMvcConfigurerAdapter() {
          @Override
          public void addResourceHandlers (ResourceHandlerRegistry registry) {
              registry.addResourceHandler("/**").
                        addResourceLocations("classpath:/static/");
          }
      };
  }
  </code></pre>
  
  <p>BUT WebMvcConfigurerAdapter is deprecated in Spring 5. How can I access the static resources now?</p>