How can I serve static html from spring boot?

前端 未结 6 910
感情败类
感情败类 2020-12-05 06:18

I ran the spring-boot-sample-web-static project from here, made this alteration to the pom


    org.springframework.boot&l         


        
6条回答
  •  青春惊慌失措
    2020-12-05 07:17

    I had to add thymeleaf dependency to pom.xml. Without this dependency Spring boot didn't find static resources.

     
        org.springframework.boot
        spring-boot-starter-thymeleaf
    
    

提交回复
热议问题