Closed li-sui closed 3 years ago
There are more 500 errors. The issue is missing request parameters. It should return 400 Bad request rather than 500. An error handler should be implemented to deal with different exceptions.
http://localhost:8080/admin/role/edit
http://localhost:8080/admin/admin_user/edit
There was an unexpected error (type=Internal Server Error, status=500).
Request processing failed; nested exception is freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> role [in template "admin/role/edit.ftl" at line 22, column 61] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${role.id} [in template "admin/role/edit.ftl" at line 22, column 59] ~ Reached through: #nested [in template "admin/layout/layout.ftl" in macro "html" at line 77, column 13] ~ Reached through: @html page_title="角色编辑" page_tab="aut... [in template "admin/role/edit.ftl" at line 2, column 1] ----
Envrioment: -Version 5.0 -Jdk: 1.8.0_202
error mesage:
reproducible script curl:
curl http://localhost:8080/notifications
intelliJ http client:
GET http://localhost:8080/notifications