Refreshing static content with Spring MVC and Boot

前端 未结 15 2100
迷失自我
迷失自我 2020-11-28 07:02

I\'m evaluating Spring MVC & Boot and AngularJs for building web applications. I\'ve run into the problem that when I make modifications to my static content (html, js,

15条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 07:42

    I am using 1.5.8.RELEASE.

    It instantly updates my changes especially static files or jsp files.

    If you are using Maven. You need to add this in pom.xml

        
            org.springframework.boot
            spring-boot-devtools
            true
        
    

    And you have to start Spring Boot with this:

    mvn clean spring-boot:run
    

    Full example and more detail here https://www.surasint.com/spring-boot-with-auto-update-changed-files-example/

提交回复
热议问题