thymeleaf

来源:2-6 定制登录页

qq_慕斯卡4381877

2021-12-09

输入正文

老师您好,按照你给的login.html复制进去报错

我看了其他同学的类似问题也没有解决。

Thu 15:26:43.208 ERROR 49048 --- [nio-8081-exec-4] TemplateEngine                           : [THYMELEAF][http-nio-8081-exec-4] Exception processing template "login": An error happened during template parsing (template: "class path resource [templates/login.html]")

org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/login.html]")

Thu 15:26:43.210 ERROR 49048 --- [nio-8081-exec-4] [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/login.html]")] with root cause

org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'parameterName' cannot be found on null


HTML 没法显示,我复制的就是老师你源代码里面给的。login.html

Invalid username and password.
        You have been logged out.
        Username:Password:Remember Me:Submit

http://img.mukewang.com/szimg/61b1b512097a38d213050328.jpg

我没找到应该改哪里,老师可以帮助我一下吗,谢谢!

写回答

1回答

接灰的电子产品

2021-12-13

要配合java 里面的安全配置,看下源码的securityconfig

0
0

Spring Security+OAuth2 精讲,打造企业级认证与授权

一站式掌握主流安全框架与行业解决方案,从容应对各种安全难题。

1044 学习 · 316 问题

查看课程