No mapping found for HTTP request with URI [/app.js] in DispatcherServlet with name 'dispatcherServlet'
<p>I have created Spring boot application with html but getting error 
    "No mapping found for HTTP request with URI [/app.js] in DispatcherServlet with name 'dispatcherServlet'</p>

<p>Project Structure:</p>

<pre><code>TeamTrack
    --Src
       --Main
          --java
             --com.tm.controller
                  --application
                  --CertificateController
                  --WebConfig
          --resources
             ---static
                --app.js
       --Test
</code></pre>

<p>Application.java:    </p>

<pre><code>@SpringBootApplication
@EnableAutoConfiguration
@EntityScan("com.tm.vo")
@EnableJpaRepositories("com.tm.repository")
@EnableWebMvc
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
</code></pre>

<p>CertificateController.java</p>

<pre><code>@EnableWebMvc
@Controller
public class CertificateController {

    @Autowired
    private certificateRepository certRep;

    @RequestMapping(value = "/cert",method = RequestMethod.GET)
    public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
        model.addAttribute("name", name);
        return "certificate";
    }

    @RequestMapping(value = "/addCertificate", method = RequestMethod.POST)
    public String addNewCertificate(@RequestParam String certName,@RequestParam String certProvider)
    {
        certificate cert =new certificate();
        cert.setCertificateName(certName);
        cert.setCertificateProvider(certProvider);

        certRep.save(cert);
        return "/";
    }
}
</code></pre>

<p>WebConfig.java</p>

<pre><code>@Configuration
@AutoConfigureAfter(DispatcherServletAutoConfiguration.class)
public class WebConfig extends WebMvcConfigurerAdapter {

    private static final String[] CLASSPATH_RESOURCE_LOCATIONS = {
            "classpath:/static/", "classpath:/static/css/", "classpath:/static/js/" };

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        if (!registry.hasMappingForPattern("/static/**")) {
            registry.addResourceHandler("/static/**").addResourceLocations(
                    CLASSPATH_RESOURCE_LOCATIONS);
        }
    }
}
</code></pre>

<p>certificate.html</p>

<p>in the certificate.html , just calling the java script and its angular.</p>

<pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
&lt;script src="app.js"&gt;&lt;/script&gt;
</code></pre>

<p>Error Details:</p>

<blockquote>
  <p>No mapping found for HTTP request with URI [/app.js] in
  DispatcherServlet with name 'dispatcherServlet'</p>
</blockquote>

<p>In chrome, In the Developer tool, got this error:</p>

<blockquote>
  <p>Failed to load resource: the server responded with a status of 404 ()</p>
</blockquote>

<p>can anyone help on this ? </p>