We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52754e2 commit fe0305bCopy full SHA for fe0305b
III. Using Spring Boot/20.2.3 Disabling restart.md
@@ -1 +1,11 @@
1
###20.2.3 禁用重启
2
+
3
+如果不想使用重启特性,你可以通过`spring.devtools.restart.enabled`属性来禁用它,通常情况下可以在`application.properties`文件中设置(依旧会初始化重启类加载器,但它不会监控文件变化)。
4
5
+如果需要彻底禁用重启支持,比如,不能跟某个特殊库一块工作,你需要在调用`SpringApplication.run(…)`之前设置一个系统属性,如下:
6
+```java
7
+public static void main(String[] args) {
8
+ System.setProperty("spring.devtools.restart.enabled", "false");
9
+ SpringApplication.run(MyApp.class, args);
10
+}
11
+```
0 commit comments