spring boot Thymeleaf

default allocation

By default, Spring Boot provides a static resource directory location that needs to be placed on the classpath, and the directory name must meet the following rules:

  • /static
  • /public
  • /resources
  • /META-INF/resources

http://blog.didispace.com/springbootweb/

Spring Boot Thymeleaf has a default welcome screen path: src/main/resources/static/index.html

Related instructions

https://spring.io/guides/gs/serving-web-content/#initial

https://github.com/spring-projects/spring-boot/issues/7938

Add the configuration of the Thymeleaf template to the application.properties file

spring.thymeleaf.cache=false

Note that these configurations are not necessary, and if configured, they will override the default ones. 
It is recommended to set spring.thymeleaf.cache to false during development, otherwise there will be a cache, which will prevent the page from seeing the updated effect in time. 
For example, you have modified a file and it has been updated to tomcat, but the refresh page is still the previous page, which is caused by the cache.

https://blog.csdn.net/qincidong/article/details/76126060

 

html page to write  <html xmlns:th="http://www.thymeleaf.org">

Quote css js format
<link th:href="@{/home/bootstrap.min.css}" rel="stylesheet"/>
<script th:src="@{/home/bootstrap.min.js}"></script>

页面报错

HTTP Status 500 - Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Exception parsing document: template="home/el", line 18 - column 7 

Tags on html pages must be closed

https://blog.csdn.net/qq_35056292/article/details/79087993

https://www.cnblogs.com/memoryXudy/p/7681991.html

 

Using REACT and JSX in HTML - without NODEJS

https://techctu.github.io/2017/02/18/%E5%9C%A8-html-%E4%B8%AD%E4%BD%BF%E7%94%A8-react-%E5%92%8C-jsx-%E4%B8%8D%E4%BD%BF%E7%94%A8-nodejs.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325349969&siteId=291194637