Browse Source

热加载

chao 4 years ago
parent
commit
8631bf65e1

+ 1 - 1
src/main/java/com/caimei/www/controller/unlimited/SupplierController.java

@@ -52,7 +52,7 @@ public class SupplierController extends BaseController {
     }
 
     /**
-     * 供应商
+     * 供应商商品
      */
     @GetMapping("/supplier/product.html")
     public String product(final Model model, @RequestParam("id") Integer supplierId, @RequestParam("brandID") Integer brandId) {

+ 1 - 2
src/main/resources/application.yml

@@ -11,8 +11,7 @@ spring:
     enabled: true  #开启thymeleaf视图解析
     encoding: utf-8  #编码
     prefix: classpath:/templates/  #前缀
-    cache: false  #是否使用缓存
-    mode: HTML  #严格的HTML语法模式
+    mode: HTML5  #严格的HTML语法模式
     suffix: .html  #后缀名
     reactive:
       max-chunk-size: 8192

+ 2 - 0
src/main/resources/config/beta/application-beta.yml

@@ -1,4 +1,6 @@
 spring:
+  thymeleaf:
+    cache: true  #是否使用缓存
   #数据源连接--start
   datasource:
     url: jdbc:mysql://10.104.50.235:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai

+ 2 - 0
src/main/resources/config/dev/application-dev.yml

@@ -1,4 +1,6 @@
 spring:
+  thymeleaf:
+    cache: false  #是否使用缓存
   #数据源连接--start
   datasource:
     #driverClassName: com.mysql.jdbc.Driver

+ 2 - 0
src/main/resources/config/prod/application-prod.yml

@@ -1,4 +1,6 @@
 spring:
+  thymeleaf:
+    cache: true  #是否使用缓存
   #数据源连接--start
   datasource:
     url: jdbc:mysql://10.104.172.219:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai