Преглед на файлове

修改时区为上海时区

gy b преди 2 години
родител
ревизия
5ec64621fe

+ 1
- 1
ruoyi-admin/src/main/resources/application-druid.yml Целия файл

@@ -6,7 +6,7 @@ spring:
6 6
         druid:
7 7
             # 主库数据源
8 8
             master:
9
-                url: jdbc:mysql://121.40.189.20:3306/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useSSL=false
9
+                url: jdbc:mysql://121.40.189.20:3306/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
10 10
                 username: root
11 11
                 password: root123456
12 12
             # 从库数据源

+ 2
- 1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java Целия файл

@@ -25,6 +25,7 @@ public class ApplicationConfig
25 25
     @Bean
26 26
     public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
27 27
     {
28
-        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
28
+//        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
29
+        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone("Asia/Shanghai");
29 30
     }
30 31
 }