在使用 springboot 开发前端的时候,代码是放在 resources 下的,启动项目后,每次编写完html代码后,页面没有实时刷新,这样很不好,开发效率低。
解决方法:
- 在 pom 文件中加入 springboot 插件
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
- File -> settinfs -> Build,Excution,Deployment -> Compilier -> 勾选 Build project aotomatically
- 组合键
Shift+Ctrl+Alt+/ ,选择 Registry,勾选 compiler.automake.allow.when.app.runing
- 完成
|