The exception code when tomcat runs.
2019-05-27 10:41:48.364 INFO 17312 --- [nio-8094-exec-2] org.thymeleaf.TemplateEngine : [THYMELEAF] TEMPLATE ENGINE INITIALIZED
java.lang.NullPointerException
Finally found the reason is because
It runs normally in the built-in sprin boot in idea, but it is case sensitive when typing into a jar.