The path in templateEngine.process(“/mail/demo”, context) is not an absolute path, but a relative path relative to the root path of the application.
This is because in Spring Boot, the default configuration of the template engine has set the root path of the template file to /src/main/resources/templates, so when calling the templateEngine.process() method, you only need to provide a path relative to the root The relative path of the . If the provided path is an absolute path, it will be resolved to the absolute path of the operating system, not relative to the root path of the template file.
templateEngine.process("/mail/demo", context); why is the path not an absolute path
Guess you like
Origin blog.csdn.net/yeeanna/article/details/129792772
Recommended
Ranking