在配置好一个使用maven的web项目时,发现了好多的错,进过多方打探和自己摸索,想趁热记下来。
E:\java\jdk1.8.0_131\bin\java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:E:\JetBrains\IntelliJ IDEA 2017.1.4\lib\idea_rt.jar=61849:E:\JetBrains\IntelliJ IDEA 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath E:\java\jdk1.8.0_131\jre\lib\charsets.jar;E:\java\jdk1.8.0_131\jre\lib\deploy.jar;E:\java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;E:\java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;E:\java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;E:\java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;E:\java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;E:\java\jdk1.8.0_131\jre\lib\ext\localedata.jar;E:\java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;E:\java\jdk1.8.0_131\jre\lib\ext\sunec.jar;E:\java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;E:\java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;E:\java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;E:\java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;E:\java\jdk1.8.0_131\jre\lib\javaws.jar;E:\java\jdk1.8.0_131\jre\lib\jce.jar;E:\java\jdk1.8.0_131\jre\lib\jfr.jar;E:\java\jdk1.8.0_131\jre\lib\jfxswt.jar;E:\java\jdk1.8.0_131\jre\lib\jsse.jar;E:\java\jdk1.8.0_131\jre\lib\management-agent.jar;E:\java\jdk1.8.0_131\jre\lib\plugin.jar;E:\java\jdk1.8.0_131\jre\lib\resources.jar;E:\java\jdk1.8.0_131\jre\lib\rt.jar;C:\Users\admin\Desktop\数据库项目组\echarts\target\classes;E:\briup\maven\repository\org\springframework\boot\spring-boot-starter-web\1.5.9.RELEASE\spring-boot-starter-web-1.5.9.RELEASE.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot-starter\1.5.9.RELEASE\spring-boot-starter-1.5.9.RELEASE.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot-starter-logging\1.5.9.RELEASE\spring-boot-starter-logging-1.5.9.RELEASE.jar;E:\briup\maven\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;E:\briup\maven\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;E:\briup\maven\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;E:\briup\maven\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\briup\maven\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;E:\briup\maven\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.9.RELEASE\spring-boot-starter-tomcat-1.5.9.RELEASE.jar;E:\briup\maven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.23\tomcat-embed-websocket-8.5.23.jar;E:\briup\maven\repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;E:\briup\maven\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;E:\briup\maven\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;E:\briup\maven\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\briup\maven\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;E:\briup\maven\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;E:\briup\maven\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;E:\briup\maven\repository\org\springframework\spring-web\4.3.13.RELEASE\spring-web-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\spring-aop\4.3.13.RELEASE\spring-aop-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\spring-beans\4.3.13.RELEASE\spring-beans-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\spring-context\4.3.13.RELEASE\spring-context-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\spring-webmvc\4.3.13.RELEASE\spring-webmvc-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\spring-expression\4.3.13.RELEASE\spring-expression-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\briup\maven\repository\org\springframework\spring-core\4.3.13.RELEASE\spring-core-4.3.13.RELEASE.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot-devtools\1.5.9.RELEASE\spring-boot-devtools-1.5.9.RELEASE.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot\1.5.9.RELEASE\spring-boot-1.5.9.RELEASE.jar;E:\briup\maven\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.9.RELEASE\spring-boot-autoconfigure-1.5.9.RELEASE.jar;E:\briup\maven\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;E:\briup\maven\repository\javax\servlet\jstl\1.2\jstl-1.2.jar;E:\briup\maven\repository\org\apache\tomcat\embed\tomcat-embed-jasper\8.5.23\tomcat-embed-jasper-8.5.23.jar;E:\briup\maven\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.23\tomcat-embed-core-8.5.23.jar;E:\briup\maven\repository\org\apache\tomcat\tomcat-annotations-api\8.5.23\tomcat-annotations-api-8.5.23.jar;E:\briup\maven\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.23\tomcat-embed-el-8.5.23.jar;E:\briup\maven\repository\org\eclipse\jdt\ecj\3.12.3\ecj-3.12.3.jar;E:\briup\maven\repository\taglibs\standard\1.1.2\standard-1.1.2.jar;E:\briup\maven\repository\com\alibaba\fastjson\1.2.44\fastjson-1.2.44.jar;E:\briup\maven\repository\net\sourceforge\javacsv\javacsv\2.0\javacsv-2.0.jar com.hoperun.echarts.EchartsApplication
17:16:00.032 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
17:16:00.051 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
17:16:00.052 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/C:/Users/admin/Desktop/%e6%95%b0%e6%8d%ae%e5%ba%93%e9%a1%b9%e7%9b%ae%e7%bb%84/echarts/target/classes/]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.9.RELEASE)
2018-01-03 17:16:01.352 INFO 14720 --- [ restartedMain] com.hoperun.echarts.EchartsApplication : Starting EchartsApplication on user with PID 14720 (started by admin in C:\Users\admin\Desktop\数据库项目组\echarts)
2018-01-03 17:16:01.353 INFO 14720 --- [ restartedMain] com.hoperun.echarts.EchartsApplication : No active profile set, falling back to default profiles: default
2018-01-03 17:16:01.635 INFO 14720 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2496bf83: startup date [Wed Jan 03 17:16:01 CST 2018]; root of context hierarchy
2018-01-03 17:16:06.783 INFO 14720 --- [ restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8899 (http)
2018-01-03 17:16:06.879 INFO 14720 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-01-03 17:16:06.881 INFO 14720 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2018-01-03 17:16:07.472 INFO 14720 --- [ost-startStop-1] org.apache.jasper.servlet.TldScanner : 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.
2018-01-03 17:16:07.480 INFO 14720 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/echarts] : Initializing Spring embedded WebApplicationContext
2018-01-03 17:16:07.480 INFO 14720 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 5899 ms
2018-01-03 17:16:07.843 INFO 14720 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2018-01-03 17:16:07.848 INFO 14720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-01-03 17:16:07.865 INFO 14720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-01-03 17:16:07.865 INFO 14720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-01-03 17:16:07.865 INFO 14720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-01-03 17:16:08.259 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2496bf83: startup date [Wed Jan 03 17:16:01 CST 2018]; root of context hierarchy
2018-01-03 17:16:08.338 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/index]}" onto public java.lang.String com.hoperun.echarts.controller.EchartsController.index()
2018-01-03 17:16:08.338 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.hoperun.echarts.controller.EchartsController.toIndex()
2018-01-03 17:16:08.340 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/analyze]}" onto public java.lang.String com.hoperun.echarts.controller.EchartsController.toAnalyze(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
2018-01-03 17:16:08.343 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-01-03 17:16:08.344 INFO 14720 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-01-03 17:16:08.389 INFO 14720 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-03 17:16:08.389 INFO 14720 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-03 17:16:08.427 INFO 14720 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-03 17:16:08.642 INFO 14720 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-01-03 17:16:08.728 INFO 14720 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-01-03 17:16:08.929 INFO 14720 --- [ restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8899 (http)
2018-01-03 17:16:08.935 INFO 14720 --- [ restartedMain] com.hoperun.echarts.EchartsApplication : Started EchartsApplication in 8.859 seconds (JVM running for 16.613)
网上的结论是因为application.properties文件没写对,但是我检查了以后发现自己写的是正确的,然后找了很多相关的文章,最后发现是因为在运行项目时没有指定working directory。
具体配制方法是: