SpringBootはどのようにdevtoolsを通じて熱い展開を実現しますか?
この文章は主にSpringBootがdevtoolsを通じてどのように熱い展開を実現するかを紹介しています。ここでは例示的なコードで紹介されています。皆さんの学習や仕事に対して一定の参考となる学習価値があります。必要な友達は以下のように参照してください。
プロジェクトのpom.xmlファイルに次の2つのセクションを追加します。

Intellij IEDA開発ツールを使用する場合は、設定にプロジェクトatomaticalyをチェックして選択する必要があります。File->Setting->Build,->Complerは右側project atomaticaallyをチェックします。

Intellij IEDAは、ctrl+shift+aショートカットキーを使ってRegistryを検索し、検索した最初のものを選択します。

comppiler.atomake.allow.when.ap.runningを見つけて、この機能をオンにするだけでいいです。

この時、プロジェクトを再起動すれば、熱配置が実現できます。任意のコードを変更すると、直ちに有効になります。プロジェクトを再起動するたびに、プロジェクトを再起動しなくてもいいです。
プロジェクトのpom.xmlファイルに次の2つのセクションを追加します。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>1.5.7.RELEASE</version>
<optional>true</optional>
</dependency>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>

Intellij IEDA開発ツールを使用する場合は、設定にプロジェクトatomaticalyをチェックして選択する必要があります。File->Setting->Build,->Complerは右側project atomaticaallyをチェックします。

Intellij IEDAは、ctrl+shift+aショートカットキーを使ってRegistryを検索し、検索した最初のものを選択します。

comppiler.atomake.allow.when.ap.runningを見つけて、この機能をオンにするだけでいいです。

この時、プロジェクトを再起動すれば、熱配置が実現できます。任意のコードを変更すると、直ちに有効になります。プロジェクトを再起動するたびに、プロジェクトを再起動しなくてもいいです。