To exclude auto restart for static files in spring boot see the following:-
By default changing resources in /META-INF/maven, /META-INF/resources, /resources, /static, /public or /templates will not trigger a restart.
But If you want to customize these exclusions you can use the spring.devtools.restart.exclude property.
If you want to keep those defaults and add additional exclusions, use the spring.devtools.restart.additional-exclude property instead.
Spring boot automatic restart devtools eclipse maven
Spring Boot includes an additional set of tools that can make the application development time a little more faster by reducing its restart time.
To include devtools support, simply add the below dependency to your pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>