I almost changed this day. . How packages are not right.
Development environment: win10 eclipse
The main reference is:
https://blog.csdn.net/Paulangsky/article/details/86738583
https://www.cnblogs.com/joeyJss/p/11174884.html
As well as blog and discuss some users, most debug focused on the following two methods:
but! ! ! ! To no avail! ! ! Always report 500 can not access the templates at any HTML . the existence templates folder jar package:
The final reference to this problem:
https://blog.csdn.net/a961011576/article/details/81843684
============================= Troubleshooting ================== course ============
First posted my directory structure. I do not webapp folder. All resources on the resources below.
Before packaging needs to be modified in the project are:
pom.xml
Main categories:
application.yml: When the eclipse test run # comment out the line prefix
After maven clean, maven build
Then the templates folder copied to the target jar at the same level.
cmd ---> java -jar XXX.jar
You can successfully run
## Note: The original po say only handle jar could not cope with war, I did not try, do not know.
================================================
I Ruriko, I love this world :)