Переглянути джерело

增加开发-私有版dev-private配置

郭超 4 роки тому
батько
коміт
f863145e50

+ 7 - 1
site/src/main/java/com/mooctest/crowd/site/service/impl/CommonServiceImpl.java

@@ -26,6 +26,7 @@ import com.mooctest.crowd.site.service.CommonService;
 import com.mooctest.crowd.site.util.DataUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
@@ -66,6 +67,9 @@ public class CommonServiceImpl implements CommonService {
     @Autowired
     private WebMediatorImpl webMediator;
 
+    @Value("${feature.import.task}")
+    private String featureImportTask;
+
     @Override
     public List<UserVO> getMoreUser(Pageable pageable,String keyword) {
         return  viewMediator.renderMoreUser(pageable,keyword);
@@ -320,7 +324,9 @@ public class CommonServiceImpl implements CommonService {
 
     @Override
     public ConfigurationVO getConfigurationListMap() {
-        return new ConfigurationVO(commonRepo.getConfigurationListMap());
+        Map<String, String> configurationMap = commonRepo.getConfigurationListMap();
+        configurationMap.put("feature_import_task", "{\"feature_import_task\":" + featureImportTask + "}");
+        return new ConfigurationVO(configurationMap);
     }
 
     Pageable getPageable(SearchConditionVO searchConditionVO) {

+ 44 - 1
site/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-     active: dev-online
+     active: dev-private
   cache:
     guava:
       spec: expireAfterWrite=30s
@@ -73,6 +73,9 @@ upload:
   window: #window系统指定盘符
     root: D:/
 
+feature:
+  import:
+    task: true
 
 ---
 spring:
@@ -115,6 +118,46 @@ website:
   domain: mooctest.net
 
 ---
+# 开发-私有版
+spring:
+  profiles: dev-private
+  datasource:
+    url: jdbc:mysql://101.37.175.111:3306/crowd-test-service-private?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+    username: mooctest
+    password: secr3t!
+  redis:
+    host: 59.42.10.53
+    port: 6379
+    password: '#2019@callforttest@!'
+    jedis:
+      pool:
+        max-active: 8
+        max-idle: 8
+        max-wait: -1
+        min-idle: 0
+    database: 6
+user:
+  service:
+    baseUrl: http://59.42.10.53:8081
+
+#file:
+#  save:
+#    path: /var/www/
+
+file:
+  save:
+    path: /Users/guochao/Desktop/project/data/cofortest/
+
+#feature:
+#  client:
+#    oss: true
+feature:
+  client:
+    oss: false
+
+website:
+  domain: mooctest.net
+---
 spring:
   profiles: private-cloud
   datasource: