Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is

前端报错Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is_第1张图片

login.js报错  但是排查问题貌似没有问题

关于后台权限  springsecurity 好像配置挺全没有问题 

此时排查可能是前端问题

一直报这个错误    后台没报错

后台启动日志

D:\tomcat\apache-tomcat-8.5.27\bin\catalina.bat run

[2019-03-21 02:57:58,198] Artifact qiangui:war exploded: Waiting for server connection to start artifact deployment...

Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_qiangui_7"

Using CATALINA_HOME:   "D:\tomcat\apache-tomcat-8.5.27"

Using CATALINA_TMPDIR: "D:\tomcat\apache-tomcat-8.5.27\temp"

Using JRE_HOME:        "D:\java9\source"

Using CLASSPATH:       "D:\tomcat\apache-tomcat-8.5.27\bin\bootstrap.jar;D:\tomcat\apache-tomcat-8.5.27\bin\tomcat-juli.jar"

21-Mar-2019 14:57:59.681 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.27

21-Mar-2019 14:57:59.685 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 18 2018 20:12:40 UTC

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.27.0

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             D:\java9\source\jre

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_131-b11

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_qiangui_7

21-Mar-2019 14:57:59.686 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\tomcat\apache-tomcat-8.5.27

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_qiangui_7\conf\logging.properties

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xverify:none

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099

21-Mar-2019 14:57:59.687 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false

21-Mar-2019 14:57:59.688 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false

21-Mar-2019 14:57:59.691 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_qiangui_7

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\tomcat\apache-tomcat-8.5.27

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\tomcat\apache-tomcat-8.5.27\temp

21-Mar-2019 14:57:59.692 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].

21-Mar-2019 14:57:59.693 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

21-Mar-2019 14:57:59.693 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

21-Mar-2019 14:58:00.753 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2m  2 Nov 2017]

21-Mar-2019 14:58:00.913 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

21-Mar-2019 14:58:00.935 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

21-Mar-2019 14:58:00.944 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]

21-Mar-2019 14:58:00.948 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

21-Mar-2019 14:58:00.948 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1641 ms

21-Mar-2019 14:58:01.081 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

21-Mar-2019 14:58:01.081 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.27

21-Mar-2019 14:58:01.100 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]

21-Mar-2019 14:58:01.114 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]

21-Mar-2019 14:58:01.118 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 169 ms

Connected to server

[2019-03-21 02:58:01,389] Artifact qiangui:war exploded: Artifact is being deployed, please wait...

21-Mar-2019 14:58:11.141 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat\apache-tomcat-8.5.27\webapps\manager]

21-Mar-2019 14:58:11.545 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat\apache-tomcat-8.5.27\webapps\manager] has finished in [403] ms

21-Mar-2019 14:58:19.735 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

14:58:19,879 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]

14:58:19,880 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]

14:58:19,880 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/E:/ceshi/qiangui/target/qiangui/WEB-INF/classes/logback.xml]

14:58:20,011 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set

14:58:20,048 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]

14:58:20,054 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]

14:58:20,095 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@5:13 - no applicable action for [Encoding], current ElementPath  is [[configuration][appender][Encoding]]

14:58:20,098 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property

14:58:20,202 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]

14:58:20,205 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [rollingFile]

14:58:20,217 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@14:13 - no applicable action for [Encoding], current ElementPath  is [[configuration][appender][Encoding]]

14:58:20,243 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used

14:58:20,246 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern ../logs/yy.%d{yyyy-MM-dd}.log for the active file

14:58:20,254 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '../logs/yy.%d{yyyy-MM-dd}.log'.

14:58:20,254 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.

14:58:20,254 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Thu Mar 21 14:58:20 CST 2019

14:58:20,259 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property

14:58:20,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[rollingFile] - Active log file name: ../logs/yy.2019-03-21.log

14:58:20,260 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[rollingFile] - File property is set to [null]

14:58:20,268 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.dql.lms] to WARN

14:58:20,268 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [dao] to WARN

14:58:20,268 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN

14:58:20,268 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]

14:58:20,270 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [rollingFile] to Logger[ROOT]

14:58:20,270 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.

14:58:20,271 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6c4475e3 - Registering current configuration as safe fallback point

 

21-Mar-2019 14:58:24.477 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.addTransformer Added class file transformer [org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformer@f78ad92] to web application [ROOT].

[ParallelWebappClassLoader@7050b63] error can't determine annotations of missing type javax.cache.annotation.CachePut

when weaving type org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker

when weaving classes

when weaving

 [Xlint:cantFindType]

[ParallelWebappClassLoader@7050b63] error can't determine annotations of missing type javax.cache.annotation.CacheResult

when weaving type org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker

when weaving classes

when weaving

 [Xlint:cantFindType]

[ParallelWebappClassLoader@7050b63] error can't determine annotations of missing type javax.cache.annotation.CacheRemove

when weaving type org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker

when weaving classes

when weaving

 [Xlint:cantFindType]

[ParallelWebappClassLoader@7050b63] error can't determine annotations of missing type javax.cache.annotation.CacheRemoveAll

when weaving type org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker

when weaving classes

when weaving

 [Xlint:cantFindType]

[ParallelWebappClassLoader@7050b63] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

AspectJ Internal Error: unable to add stackmap attributes. null

log4j:WARN No appenders could be found for logger (org.jboss.logging).

log4j:WARN Please initialize the log4j system properly.

[ParallelWebappClassLoader@7050b63] error can't determine implemented interfaces of missing type org.jsoup.nodes.Document

when weaving type org.hibernate.validator.internal.constraintvalidators.SafeHtmlValidator

when weaving classes

when weaving

 [Xlint:cantFindType]

[ParallelWebappClassLoader@7050b63] error can't determine implemented interfaces of missing type org.jsoup.nodes.Document

when weaving type org.hibernate.validator.internal.constraintvalidators.SafeHtmlValidator

when weaving classes

when weaving

 [Xlint:cantFindType]

[2019-03-21 02:58:46,575] Artifact qiangui:war exploded: Artifact is deployed successfully

[2019-03-21 02:58:46,576] Artifact qiangui:war exploded: Deploy took 45,186 milliseconds

21-Mar-2019 14:58:50.233 信息 [http-nio-8080-exec-9] org.apache.tomcat.util.http.parser.Cookie.logInvalidHeader A cookie header was received [1550248547,1550283416,1550289542; Hm_lvt_f98257d164a7690cce2cab7629ec3707=1552470823; Hm_lvt_1cf880de4bc3c11500482f152b3353c0=1553134935; Hm_lpvt_1cf880de4bc3c11500482f152b3353c0=1553146920; JSESSIONID=CCB035DF6A2743BAA498586BCA3B220D] that contained an invalid cookie. That cookie will be ignored.Note: further occurrences of this error will be logged at DEBUG level.

 

 

最后login.jsp的登录这块Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is_第2张图片弄到login.js里

修改login.js成这样

Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is_第3张图片

拦截器  0改为1

Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is_第4张图片

最后完美启动不报错,一切功能正常

Refused to execute script from 'http://localhost:8080/login' because its MIME type ('text/html') is_第5张图片

你可能感兴趣的:(前端,拦截器)