Error in thymeleaf referencing webjar.

  1. created a spring boot project with spring initializr in idea. Css is referenced in the html written with thymeleaf, but it is impossible to quote it alive or dead. It has been looked up on the Internet for a long time, but it is of no use.
  2. all kinds of attempts are not allowed if you use what is written on the official website of spring boot, nor can you use what is written on a document that uses webjars.
  3. The
  4. directory is here

clipboard.png


1.

clipboard.png

clipboard.png

clipboard.png

Dec.30,2021

/ *

  • @ EnableWebMvc full control of invalid MVC,boot autoconfiguration.

*

  • inheriting WebMvcConfigurationSupport is equivalent to using @ EnableWebMvc

*

  • implementing WebMvcConfigurer is equivalent to WebMvcConfigurerAdapter

*

  • inheriting from WebMvcConfigurerAdapter is out of date, because jdk1.8 supports the default keyword of the interface, so you don't need an empty abstract class.

* /

well, at first I saw that adapter was out of date, so I used support directly.
you still need to check more, and then try again.

Menu