1.通过spingboot启动类启动 不能自动加载修改静态文件问题
yml中添加以下
devtools:
restart:
#热部署生效
enabled: true
#设置重启的目录
additional-paths: resources/**,static/**,templates/**
#该目录下的内容修改不重启
exclude: com/**
thymeleaf:
cache: false
pom文件添加以下:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
shift+ctrl+alt+/(我猜的,不敢保证,自己试一下),会弹出这个界面:
就选第一个,Resgistry
往下翻,找到这一条,打上勾,关闭
打开设置
到目前为止就可以了