spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword", template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
    at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
    at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

以上错误,是个低级错误,我们都知道,在controller上加注解@Controller 和@RestController都可以在前端调通接口,但是二者的区别在于,当用前者的时候在方法上必须添加注解@ResponseBody,如果不添加@ResponseBody,就会报上面错误,因为当使用@Controller 注解时,spring默认方法返回的是view对象(页面)。而加上@ResponseBody,则方法返回的就是具体对象了。@RestController的作用就相当于@[email protected]的结合体

原文地址:https://www.cnblogs.com/cyl048/p/8847280.html

时间: 2024-10-03 14:39:12

spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException的相关文章

spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure

spring boot 启动报错:Cannot determine embedded database driver class for database type NONE

错误原因:spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean.因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错. 解决办法:第一种:在Applicat

Spring Boot 启动报错 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37

使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37 at java.lang.String.substring(String.java:1963) at org.springframework.boot.loader.jar.JarFile.create

Spring boot 启动报错:com.mongodb.MongoSocketOpenException: Exception opening socket

详细错误信息: com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.connection.SocketStream.open(SocketStream.java:63) ~[mongodb-driver-core-3.4.2.jar:na] at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnect

Spring Boot 启动报错:LoggingFailureAnalysisReporter

17:57:19: Executing task 'bootRun'... Parallel execution with configuration on demand is an incubating feature.:thinkvenus-common:compileJava:thinkvenus-tool:processResources UP-TO-DATE:thinkvenus-common:compileJava UP-TO-DATE:thinkvenus-common:proce

spring boot aop 报错

1.控制台报错 Pointcut is not well-formed: expecting 'name pattern' at character position 33 execution(com.stu.controller.*.*(..)) 2.eclipse提示 Pointcut is malformed: Pointcut is not well-formed: expecting 'name pattern' at character position 33 execution(c

解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

学习了:https://blog.csdn.net/yunfeng482/article/details/78106433 没想到啊:我都看见了,idea也反编不了: 没想到要重新下载啊: 原文地址:https://www.cnblogs.com/stono/p/9126417.html

spring Boot异步操作报错误: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.self.spring.springboot.Jeep' available

我也是最近开始学习Spring Boot,在执行异步操作的时候总是汇报如下的错误: Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.self.spring.springboot.Jeep' available at org.springframework.beans.factory.sup

dubbo spring pom文件报错:提示no declaration can be found for element 'dubbo:service'.

pom文件报错:The matching wildcard is strict, but no declaration can be found for  element 'dubbo:service'. 解决办法: 找到dubbo的jar包,解压后在META-INF文件夹下找到dubbo.xsd 在eclipse中点击windows-->preferrence-->xml-->xmlcatalog 选择add-->catalog entry  -->file system