pull/1/head
tanghc 5 years ago
parent d19e4a79e9
commit 84b31313bf
  1. 1
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/config/ConfigListApi.java
  2. 8
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/config/WebConfig.java
  3. 3
      sop-admin/sop-admin-server/src/main/resources/application-dev.properties
  4. 3
      sop-gateway/src/main/resources/application-dev.properties

@ -10,5 +10,4 @@ import com.gitee.easyopen.doc.annotation.ApiDoc;
@ApiDoc("配置列表")
public class ConfigListApi {
// public
}

@ -41,9 +41,11 @@ public class WebConfig {
ApiConfig apiConfig() {
ApiConfig apiConfig = new ApiConfig();
apiConfig.setJsonResultSerializer(obj -> JSON.toJSONString(obj,
SerializerFeature.WriteDateUseDateFormat
, SerializerFeature.WriteNullStringAsEmpty
, SerializerFeature.WriteMapNullValue));
SerializerFeature.WriteNullStringAsEmpty
, SerializerFeature.WriteMapNullValue
, SerializerFeature.WriteDateUseDateFormat)
);
ApiSessionManager apiSessionManager = new ApiSessionManager();
// session有效期
int timeout = NumberUtils.toInt(accessTokenTimeout, 30);

@ -3,6 +3,7 @@ spring.application.name=sop-admin
# ------- 需要改的配置 -------
# mysql数据库账号
mysql.host=localhost:3306
mysql.username=root
mysql.password=root
@ -21,7 +22,7 @@ nacos.discovery.server-addr=${nacos.url}
# 数据库配置
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
spring.datasource.url=jdbc:mysql://${mysql.host}/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
spring.datasource.username=${mysql.username}
spring.datasource.password=${mysql.password}

@ -3,6 +3,7 @@ spring.application.name=api-gateway
# ------- 需要改的配置 -------
# mysql数据库账号
mysql.host=localhost:3306
mysql.username=root
mysql.password=root
@ -39,7 +40,7 @@ spring.cloud.nacos.discovery.server-addr=${nacos.url}
nacos.config.server-addr=${nacos.url}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
spring.datasource.url=jdbc:mysql://${mysql.host}/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
spring.datasource.username=${mysql.username}
spring.datasource.password=${mysql.password}

Loading…
Cancel
Save