'Can we make folder inside template package of SpringBoot Application?
I have been working on dummy Web application, and there are lot html file in template which I want to organize. I am getting an error when I have keeping them in folder inside Templete, what is the procedure for that?
I am using thymleaf and SpringBoot for my application.
Solution 1:[1]
How do you call those templates in sub-folders? Should be like this:
@RequestMapping("/endpoint")
public String getMyPageItem() {
return "my-folder/folder/item";
}
where my-folder inside /resources/templates/ and item is item.html file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kirill Vizniuk |
