SpringBoot项目打包jar后运行报错Error resolving templ ate [XXX], template might not exist

SpringBoot项目在IDEA开发期间运行一切正常,但是打成jar包后运行出现页面访问不了,报如下错误:

2020/07/26-20:42:41 [http-nio-8081-exec-3] ERROR org.thymeleaf.TemplateEngine- [THYMELEAF][http-nio-8081-exec-3] Exception processing template “/i18n/before”: Error resolving templ
ate [/i18n/before], template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/i18n/before], template might not exist or might not be accessible by any of the configured Template Reso
lvers
at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
。。。。。。

SpringBoot项目打包jar后运行报错Error resolving templ ate [XXX], template might not exist
解决方案如下:
将"/i18n/first"前面的"/“删掉
SpringBoot项目打包jar后运行报错Error resolving templ ate [XXX], template might not exist
效果如下:
删了”/“后:http://localhost:8081/i18n/first
SpringBoot项目打包jar后运行报错Error resolving templ ate [XXX], template might not exist
没删”/"的:http://localhost:8081/i18n/admin
SpringBoot项目打包jar后运行报错Error resolving templ ate [XXX], template might not exist