Exception processing template “userList“: Could not parse as expression: ““ (template: “userList“ -

问题详情如下

021-02-22 11:39:41.153  INFO 20104 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-02-22 11:39:41.153  INFO 20104 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2021-02-22 11:39:41.154  INFO 20104 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms
2021-02-22 11:39:41.257 ERROR 20104 --- [nio-8080-exec-2] com.alibaba.druid.pool.DruidDataSource   : testWhileIdle is true, validationQuery not set
2021-02-22 11:39:41.267  INFO 20104 --- [nio-8080-exec-2] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
2021-02-22 11:39:41.866 ERROR 20104 --- [nio-8080-exec-2] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-8080-exec-2] Exception processing template "userList": Could not parse as expression: "" (template: "userList" - line 24, col 24)

org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "" (template: "userList" - line 24, col 24)
    at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:131) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
    at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:62) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
    at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:44) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
    at org.thymeleaf.engine.EngineEventUtils.parseAttributeExpression(EngineEventUtils.java:220) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
    at org.thymeleaf.engine.EngineEventUtils.computeAttributeExpression(EngineEventUtils.java:207) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]

刚开始学,一些详细内容并不了解,查询后,发现thymeleaf有一些限制,使用th语言,内容为空就会报错
Exception processing template “userList“: Could not parse as expression: ““ (template: “userList“ -

将此种的内容填写就可以正常访问

上一篇:springboot+thymeleaf+echarts,待完善


下一篇:springboot+thymeleaf实现学生信息管理系统