org.thymeleaf.TemplateEngine : 以及o.a.c.c.C.[.[.[/].[dispatcherServlet] 报错处理

控制台报错

在这里插入图片描述
在这里插入图片描述

报错处理

多数都是Controller层配置问题

  1. 忘记加@ResponseBody(我遇到的错,就是上面错误解决方法)
    在这里插入图片描述
  2. 将@Controller修改@RestController
    a
    改为

在这里插入图片描述

  1. 将return “/meikang/dept” 去除/
    在这里插入图片描述
发布了15 篇原创文章 · 获赞 9 · 访问量 2万+
展开阅读全文

采用springboot 框架的maven程序启动时没错,当在浏览器进行页面访问时后台如下错误,页面显示500错误

07-09

2019-07-09 20:42:45.279 ERROR 10548 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/crud] threw exception [Request processing failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogFormatUtils] with root cause java.lang.ClassNotFoundException: org.springframework.core.log.LogFormatUtils at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_151] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_151] at org.springframework.web.servlet.DispatcherServlet.logRequest(DispatcherServlet.java:955) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:910) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] 2019-07-09 20:42:45.284 ERROR 10548 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] threw exception java.lang.NoClassDefFoundError: org/springframework/core/log/LogFormatUtils at org.springframework.web.servlet.DispatcherServlet.logRequest(DispatcherServlet.java:955) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:910) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:472) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:395) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:254) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:349) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] 2019-07-09 20:42:45.285 ERROR 10548 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost] : Exception Processing ErrorPage[errorCode=0, location=/error] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogFormatUtils at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1013) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:472) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:395) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:254) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:349) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) [tomcat-embed-core-8.5.31.jar:8.5.31] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] Caused by: java.lang.NoClassDefFoundError: org/springframework/core/log/LogFormatUtils at org.springframework.web.servlet.DispatcherServlet.logRequest(DispatcherServlet.java:955) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:910) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE] ... 26 common frames omitted 问答

springboot配置thymeleaf

08-06

application.properties: ``` #thymeleaf spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html spring.thymeleaf.mode=HTML spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.contentType=text/html spring.thymeleaf.cache=false ``` 视图返回: ``` /** * * @param registry */ @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/user/login").setViewName("canal/user/login"); registry.addViewController("/user/index").setViewName("canal/user/user_index"); } ``` 结构目录: ![图片说明](https://img-ask.csdn.net/upload/201808/06/1533542523_271145.png) 报警告: ``` 2018-08-06 15:46:12.829 INFO 4416 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/user/login] onto handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController] 2018-08-06 15:46:12.829 INFO 4416 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/user/index] onto handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController] 2018-08-06 15:46:12.838 INFO 4416 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-08-06 15:46:12.839 INFO 4416 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-08-06 15:46:12.839 INFO 4416 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/static/canal/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-08-06 15:46:12.893 WARN 4416 --- [ main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration) 2018-08-06 15:46:13.167 INFO 4416 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2018-08-06 15:46:13.169 INFO 4416 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'druidDataSource' has been autodetected for JMX exposure 2018-08-06 15:46:13.178 INFO 4416 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'druidDataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=druidDataSource,type=DruidDataSource] 2018-08-06 15:46:13.231 INFO 4416 --- [ main] o.s.b.w.e.t.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '/CANAL' 2018-08-06 15:46:13.237 INFO 4416 --- [ main] c.Application : Started Application in 3.552 seconds (JVM running for 4.212) ``` 访问: localhost:8080/CANAL/user/login 出现: ``` 2018-08-06 16:03:36.778 ERROR 4416 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/CANAL] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "canal/user/login", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause org.thymeleaf.exceptions.TemplateInputException: Error resolving template "canal/user/login", template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:870) ~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) ~[thymeleaf-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:354) ~[thymeleaf-spring5-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:187) ~[thymeleaf-spring5-3.0.9.RELEASE.jar:3.0.9.RELEASE] at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE] ``` 问答

spring boot打开网页错误500,错误信息如下,怎么解决?

04-26

2019-04-26 12:59:31.688 INFO 11188 --- [p-nio-80-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2019-04-26 12:59:31.688 INFO 11188 --- [p-nio-80-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2019-04-26 12:59:31.693 INFO 11188 --- [p-nio-80-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms 2019-04-26 12:59:31.994 ERROR 11188 --- [p-nio-80-exec-2] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-80-exec-2] Exception processing template "index": An error happened during template parsing (template: "class path resource [templates/index.html]") org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/index.html]") 2019-04-26 12:59:32.001 ERROR 11188 --- [p-nio-80-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/index.html]")] with root cause org.springframework.expression.spel.SpelEvaluationException: EL1012E: Cannot index into a null value ``` <!DOCTYPE html> <html lang="zh" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <title>车联网监测系统</title> <meta name="keywords" content="车联网监测系统"> <meta name="description" content="车联网监测系统"> <!--[if lt IE 9]> <meta http-equiv="refresh" content="0;ie.html"/> <![endif]--> </head> <link th:href="@{/css/bootstrap.css}" rel="stylesheet"/> <link th:href="@{/css/base.css}" rel="stylesheet"/> <link th:href="@{/css/index.css}" rel="stylesheet"/> <style> .t_title { width: 100%; height: 100%; text-align: center; font-size: 2.5em; line-height: 80px; color: #fff; } #chart_map { cursor: pointer; } .t_show { position: absolute; top: 0; right: 0; border-radius: 2px; background: #2C58A6; padding: 2px 5px; color: #fff; cursor: pointer; } </style> <body> <div> <div class="header"> <div class="bg_header"> <div class="header_nav fl t_title"> 车辆运行监测系统 </div> </div> </div> <div class="data_content"> <div class="data_main" > <div class="main_left fl" style="height: 610px;" > <div class="left_1 " style="height: 100%;" > <!--左上边框--> <div class="t_line_box"> <i class="t_l_line"></i> <i class="l_t_line"></i> </div> <!--右上边框--> <div class="t_line_box"> <i class="t_r_line"></i> <i class="r_t_line"></i> </div> <!--左下边框--> <div class="t_line_box"> <i class="l_b_line"></i> <i class="b_l_line"></i> </div> <!--右下边框--> <div class="t_line_box"> <i class="r_b_line"></i> <i class="b_r_line"></i> </div> <div class="main_title"> <img src="img/t_1.png" alt=""> 所有车辆信息 </div> <div style="width:100%;height: 100%;"> <div style="width: 100%;margin-top: 20%;text-align: center;" th:each="data:${list}" > <a th:onclick="'javascript:select('+${data.id}+');'"> <p style="color: #0BFA00;font-size: 20px;" >[[${data.name}]]</p></a> </div> </div> </div> </div> <div class="main_center fl"> <div class="center_text"> <!--左上边框--> <div class="t_line_box"> <i class="t_l_line"></i> <i class="l_t_line"></i> </div> <!--右上边框--> <div class="t_line_box"> <i class="t_r_line"></i> <i class="r_t_line"></i> </div> <!--左下边框--> <div class="t_line_box"> <i class="l_b_line"></i> <i class="b_l_line"></i> </div> <!--右下边框--> <div class="t_line_box"> <i class="r_b_line"></i> <i class="b_r_line"></i> </div> <div class="main_title"> <img src="img/t_3.png" alt="">车辆运行轨迹图 </div> <div id="chart_map" style="width:100%;height:610px;"></div> </div> </div> <div class="main_right fr" style="height: 610px;"> <div class="right_1" style="height: 100%;"> <!--左上边框--> <div class="t_line_box"> <i class="t_l_line"></i> <i class="l_t_line"></i> </div> <!--右上边框--> <div class="t_line_box"> <i class="t_r_line"></i> <i class="r_t_line"></i> </div> <!--左下边框--> <div class="t_line_box"> <i class="l_b_line"></i> <i class="b_l_line"></i> </div> <!--右下边框--> <div class="t_line_box"> <i class="r_b_line"></i> <i class="b_r_line"></i> </div> <div class="main_title"> <img src="img/t_4.png" alt="">车辆运行信息 </div> <div id="chart_3" class="echart t_btn7" style="width:100%;height: 100%;text-align: center;font-size: 13px;color: #0BFA00;" > <p><span style="color: white">急转弯次数:</span><span id="sharpturntime">[[${list[0].sharpturntime}]]</span> <span style="color: white">ESC防侧翻是否被激活:</span><span id="escantirollover">[[${list[0].escantirollover}]]</span></p> <p><span style="color: white">ESC方向控制是否激活:</span><span id="escdirectionalcontrol">[[${list[0].escdirectionalcontrol}]]</span><span style="color: white">侧向加速度:</span><span id="lateralacceleration">[[${list[0].lateralacceleration}]]</span></p> <p><span style="color: white">纵向加速度:</span><span id="forwardacceleration">[[${list[0].forwardacceleration}]]</span><span style="color: white">制动踏板深度:</span><span id="footstepdepth">[[${list[0].footstepdepth}]]</span></p> <p><span style="color: white">与前车距离:</span><span id="distancefrontcar">[[${list[0].distancefrontcar}]]</span><span style="color: white">前车速度:</span><span id="frontcarspeed">[[${list[0].frontcarspeed}]]</span></p> <p><span style="color: white">与前车碰撞时间:</span><span id="collidetime">[[${list[0].collidetime}]]</span><span style="color: white">acc是否被激活:</span><span id="accflag">[[${list[0].accflag}]]</span></p> <p><span style="color: white">aebss给ebs发制动信号:</span><span id="aebstoebs">[[${list[0].aebstoebs}]]</span><span style="color: white">车道压线次数:</span><span id="lanepressline">[[${list[0].lanepressline}]]</span></p> <p><span style="color: white">显示是否换挡:</span><span id="shift">[[${list[0].shift}]]</span><span style="color: white">车辆行驶高度:</span><span id="carheight">[[${list[0].carheight}]]</span></p> <p><span style="color: white">牵引车重:</span><span id="carweight">[[${list[0].carweight}]]</span><span style="color: white">挂车防侧翻功能是否被启动:</span><span id="rss">[[${list[0].rss}]]</span></p> <p><span style="color: white">车速:</span><span id="carspeed">[[${list[0].carspeed}]]</span></p> <p><span style="color: white">车辆载重:</span><span id="carload">[[${list[0].carload}]]</span></p> <p><span style="color: white">货物重量:</span><span id="cargoweight">[[${list[0].cargoweight}]]</span></p> <p><span style="color: white">挂车是否被锁定:</span><span id="islock">[[${list[0].islock}]]</span></p> <p><span style="color: white">tesbs是否正常(红黄绿):</span><span id="tebsnormal">[[${list[0].tebsnormal}]]</span></p> <p><span style="color: white">tebs错误代码:</span><span id="tebserr">[[${list[0].tebserr}]]</span></p> <p><span style="color: white">胎温胎压:</span><span id="temppre">[[${list[0].temppre}]]</span></p> <p><span style="color: white">车尾防撞系统是否被激活:</span><span id="trailcrashproof">[[${list[0].trailcrashproof}]]</span></p> <p><span style="color: white">紧急刹车提醒是否被激活:</span><span id="brakewarn">[[${list[0].brakewarn}]]</span></p> <p><span style="color: white">车辆保修提醒:</span><span id="repairremind">[[${list[0].repairremind}]]</span></p> </div> </div> </div> </div> </div> </div> <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script> <script th:src="@{js/bootstrap.min.js}"></script> <script th:src="@{js/common.js}"></script> <script th:src="@{js/echarts.min.js}"></script> <script th:src="@{js/dataTool.js}"></script> <script th:src="@{js/index.js}"></script> <script th:src="@{js/china.js}"></script> <script th:src="@{js/hunan.js}"></script> <!--<script>--> <!--// var list = [[${list}]];--> <!--function rawGnssList () {--> <!--$.ajax({--> <!--cache: true,--> <!--type: "POST",--> <!--url: "/abc",--> <!--success: function (ret) {--> <!--alert(ret);--> <!--var data = JSON.stringify(ret);--> <!--alert(dat[0].iD);--> <!--}--> <!--});--> <!--}--> <!--</script>--> <script th:inline="javascript"> function select(id){ var list = [[${list}]]; var carinfo1 = list[id-1]; document.getElementById("cargoweight").innerHTML=carinfo1.cargoweight; document.getElementById("islock").innerHTML=carinfo1.islock; document.getElementById("tebsnormal").innerHTML=carinfo1.tebsnormal; document.getElementById("tebserr").innerHTML=carinfo1.tebserr; document.getElementById("temppre").innerHTML=carinfo1.temppre; document.getElementById("trailcrashproof").innerHTML=carinfo1.trailcrashproof; document.getElementById("brakewarn").innerHTML=carinfo1.brakewarn; document.getElementById("repairremind").innerHTML=carinfo1.repairremind; document.getElementById("sharpturntime").innerHTML=carinfo1.sharpturntime; document.getElementById("escantirollover").innerHTML=carinfo1.escantirollover; document.getElementById("escdirectionalcontrol").innerHTML=carinfo1.escdirectionalcontrol; document.getElementById("lateralacceleration").innerHTML=carinfo1.lateralacceleration; document.getElementById("forwardacceleration").innerHTML=carinfo1.forwardacceleration; document.getElementById("footstepdepth").innerHTML=carinfo1.footstepdepth; document.getElementById("distancefrontcar").innerHTML=carinfo1.distancefrontcar; document.getElementById("frontcarspeed").innerHTML=carinfo1.frontcarspeed; document.getElementById("collidetime").innerHTML=carinfo1.collidetime; document.getElementById("accflag").innerHTML=carinfo1.accflag; document.getElementById("aebstoebs").innerHTML=carinfo1.aebstoebs; document.getElementById("lanepressline").innerHTML=carinfo1.lanepressline; document.getElementById("shift").innerHTML=carinfo1.shift; document.getElementById("carheight").innerHTML=carinfo1.carheight; document.getElementById("carweight").innerHTML=carinfo1.carweight; document.getElementById("rss").innerHTML=carinfo1.rss; document.getElementById("carspeed").innerHTML=carinfo1.carspeed; document.getElementById("carload").innerHTML=carinfo1.carload; document.getElementById("laterala").innerHTML=carinfo1.laterala; } </script> </body> </html> ``` 问答

Servlet.service() for servlet 异常

03-13

Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.jaronsource.msneg.domain.SysUserExtend.getServiceExtend(SysUserExtend.java:216) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:192) at org.jaronsource.msneg.domain.SysUserExtend_$$_javassist_32.getServiceExtend(SysUserExtend_$$_javassist_32.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at javax.el.BeanELResolver.getValue(BeanELResolver.java:83) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at org.apache.el.parser.AstValue.getValue(AstValue.java:123) at org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45) at org.apache.el.parser.AstNot.getValue(AstNot.java:42) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:182) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:919) at org.apache.jsp.WEB_002dINF.html.talent.index_jsp._jspx_meth_c_005fif_005f2(index_jsp.java:818) at org.apache.jsp.WEB_002dINF.html.talent.index_jsp._jspService(index_jsp.java:344) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:656) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:650) at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103) at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96) at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44) at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106) at org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer.write(ChainedDelegateAttributeRenderer.java:76) at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:336) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:210) at org.apache.tiles.template.InsertAttributeModel.end(InsertAttributeModel.java:126) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:311) at org.apache.jsp.WEB_002dINF.html.default_jsp._jspx_meth_tiles_005finsertAttribute_005f0(default_jsp.java:83) at org.apache.jsp.WEB_002dINF.html.default_jsp._jspService(default_jsp.java:58) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222) at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44) at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321) at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览