[英]Is Thymeleaf necessary or useful with spring boot and reactjs?
我原以為單獨的反應對於 spring 引導應用程序的前端就足夠了,但我看到的示例也使用 Thymeleaf。 百里香可以消除嗎? 但如果是這樣,它還有用嗎?
Thymeleaf 對於 Spring 引導/反應應用程序不是必需的。 您可以提供標准 HTML 文件,並在這些 HTML 文件中添加您的反應項目所需的任何 ID。 您可以從 src/main/resources/templates/ 文件夾中提供 HTML 文件,如下所示:
/**
* Returns the home page.
*
* @return index
*/
@RequestMapping(value = "/", method = RequestMethod.GET)
public String getHomePage() {
return "index";
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.