title: Convert anonymous inner class to Java 8 lambda
body: <p>Sonar static code analysis tells me this is a code smell and should be converted to a lamdba. </p>
  
  <pre><code> public WebMvcConfigurer corsConfigurer() {
          return new WebMvcConfigurer() {
              @Override
              public void addCorsMappings(CorsRegistry registry) {
                  registry.addMapping("/**")
                 .allowedOrigins("*")
                 .allowedMethods("*");
              }
          };
      }
  </code></pre>
  
  <p>I've tried various approaches with no luck.  Any help is appreciated.</p>