Refused to execute script from ';because its MIME type ('text/html') is not executable,

1.问题描述

Refused to execute script from 'http://localhost:8080/static/lib/jquery/1.9.1/jquery.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Refused to execute script from ';because its MIME type ('text/html') is not executable,_第1张图片

2.问题分析

在网上找了很多原因,没有一个能解决的。最终采用还原大法,恢复到没有错误的状态,经过对比研究发现是controller中的GetMapping()没有参数导致,至于为啥会出现这种八竿子打不着的错误,很有可能是springboot在自动配置时,做了不该做的事,具体不详,有待考证。

3.问题解决

    //切记GetMapping中的参数不能为空,否则会产生未知错误
    @GetMapping("/map")
    public  String map(){
        return "map";
    }

你可能感兴趣的:(debug/错误日志)