Springbootホットデプロイメント、フリーマーカー、完全なメソッド

1. Maven構成をインポートします(次の2つのポイントを追加します)

<!-熱的導入-> 
<dependency> 
   <groupId> org.springframework.boot </ groupId> 
   <artifactId> spring-boot-devtools </ artifactId> 
   <optional> true </ options > 
</ dependency>
<build> 
   <plugins> 
      <plugin> 
         <groupId> org.springframework.boot </ groupId> 
         <artifactId> spring-boot-maven-plugin </ artifactId> <!-熱接続-> 
         <configuration> 
            <fork> true </ fork> 
         </ configuration> 
      </ plugin> 
   </ plugins> 
</ build>
         

2つ目は、application.ymlの結合構成です。

春:
  devtools:
   再起動:ホットデプロイメントを
     有効にする有効:true
     追加パス:src / main / javaフリーマーカーrequest-context-attribute:req #reqアクセスリクエスト
    サフィックス:.html
    コンテンツタイプ:text / html
    有効:trueキャッシュ:false#キャッシュ構成
    template-loader-path:classpath:/ templates /#テンプレートの読み込みパスはオンデマンドで構成されます
    charset:UTF-8 
     #コーディング形式の
    設定:number_format:0。###数値形式、小数点なし
    

3つ目は、アイデアの自動展開を設定する

ファイル-「設定-」コンパイラ-プロジェクトのビルドが自動的にチェックされます

ctrl + shift + alt + /、選択择レジストリ、絞り上コンパイラautoMakeはアプリの実行時に許可します

変更されたクラスが再起動し、変更されたページが再起動します。変更されたページが再起動しない場合は、変更後にCtrlF9を押します。自動展開==。

 

おすすめ

転載: blog.csdn.net/ke_new/article/details/85070850