Prechádzať zdrojové kódy

Merge branch 'feature-contest-data' into 'Test'

Feature contest data



See merge request !704

梅杰 7 rokov pred
rodič
commit
d25e3eeb52

+ 1 - 0
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/ctrl/TestController.java

@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
 
 /**
  * Created by Liu on 2017/6/5.

+ 353 - 1
mooctest-site-server/src/main/resources/application.yaml

@@ -1,3 +1,5 @@
+spring.profiles.active: dev
+
 spring:
     cache:
         guava:
@@ -19,6 +21,321 @@ spring:
     # The SQL dialect makes Hibernate generate better SQL for the chosen database
     properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
 
+auth:
+    escapeUrls:
+        - /api/common/login
+        - /api/common/logout
+        - /api/common/register
+        - /api/common/captcha
+        - /api/common/manager
+        - /api/common/worker
+        - /api/common/contest
+        - /api/common/password/forget
+        - /api/common/password/reset
+
+oss:
+    endPoint: http://oss-cn-shanghai.aliyuncs.com
+    accessKeyId: IvS323TIcWUT57MG
+    accessKeySecret: dYml7rvT8stQkoSjMYlfRTxNj9dEsI
+    region: oss-cn-shanghai
+    expireTime: 600
+    roleArn: acs:ram::1525065817051996:role/oss-archive
+
+---
+# 开发环境
+spring:
+    profiles: dev
+    datasource:
+        url: jdbc:mysql://101.37.175.111:3306/mooctest_main_dev?useUnicode=yes&characterEncoding=UTF-8
+        username: mooctest
+        password: secr3t!
+    dubbo:
+        application.name: local-dubbo-main-site-provider-consumer3
+        registry.address: zookeeper://101.37.175.111:2181
+        protocol.name: dubbo
+        protocol.port: 20884
+        scan: cn.iselab.mooctest.site.rpc
+        monitor.protocol: registry
+        timeout: 120000
+    rabbitmq:
+        host: 121.199.32.102
+        port: 5672
+        username: mooctest
+        password: mooctestPassword
+        virtual-host: dev
+    redis:
+        host: 114.55.91.27
+        port: 6379
+        password:
+        pool:
+            max-active: 8
+            max-wait: -1
+            max-idle: 8
+            min-idle: 0
+
+featureSwitch:
+    default:
+        role: worker
+    client:
+        sms: true
+        email: true
+        oss: true
+        webide: true
+    server:
+        rpcServerRunner: true
+        rpcDevService: true
+        rpcKibugService: true
+        rpcSourceService: true
+        mongoServer: true
+        UserService: false
+        enableRabbitListener: false
+
+mongodb:
+      host: 114.55.91.27
+      port: 80
+      db: testGraph
+      reportCollection: report
+      mutationCollection: mutation
+      caseGraghCollection: caseGraph
+      caughtNodeCollection: caughtNode
+      userCatchCollection: userCatch
+      catchCollection: catch
+      sumCatchCollection: sumCatch
+      competeAnalysisCollection: competeAnalysisResult
+      difficultAnalysisCollection: difficultAnalysisResult
+      timeAnalysisCollection: timeAnalysisResult
+      targetGraphCollection: targetGraph
+      base64Auth: Basic YWRtaW46Y2hhbmdlaXQ=
+
+oss:
+    bucketName:
+        dev: mooctest-dev
+        static: mooctest-mutation
+        main: mooctest-site-dev
+        app: kikbug-public
+    bucket: mooctest-site-dev
+
+rpcServer:
+    port: 9100
+    group: iselab
+    zkAddress: 101.37.175.111:2181
+
+server:
+    port: 8080
+
+cookie:
+    encryptionKey: helloiselab@2017
+    domain: .localhost
+
+logging.config: classpath:log4j2.yaml
+#logging.access.enabled: false
+
+host: http://local.mooctest.net
+
+webIDE:
+    address: 47.97.4.113:8000
+
+celeryServer:
+    host: 121.199.32.102
+    port: 5002
+---
+# 测试服务环境
+spring:
+    profiles: pre
+    datasource:
+        url: jdbc:mysql://139.224.0.118:3306/mooctest_main?useUnicode=yes&characterEncoding=UTF-8
+        username: root
+        password: secr3t!0525
+    dubbo:
+        application.name: pre-dubbo-main-site-provider-consumer
+        registry.address: zookeeper://101.37.175.111:2181
+        protocol.name: dubbo
+        protocol.port: 20883
+        protocol.host: 139.224.0.118
+        scan: cn.iselab.mooctest.site.rpc
+        monitor.protocal: registry
+    rabbitmq:
+        host: 121.199.32.102
+        port: 5672
+        username: mooctest
+        password: mooctestPassword
+        virtual-host: testhost
+    redis:
+        host: 114.55.91.27
+        port: 6379
+        password:
+        pool:
+            max-active: 8
+            max-wait: -1
+            max-idle: 8
+            min-idle: 0
+featureSwitch:
+    default:
+        role: worker
+    client:
+        sms: true
+        email: true
+        oss: true
+        webide: true
+    server:
+        rpcServerRunner: true
+        rpcDevService: true
+        rpcKibugService: true
+        rpcSourceService: true
+        mongoServer: true
+        UserService: true
+        enableRabbitListener: true
+
+mongodb:
+      host: 114.55.91.27
+      port: 80
+      db: testGraph
+      reportCollection: report
+      mutationCollection: mutation
+      caseGraghCollection: caseGraph
+      caughtNodeCollection: caughtNode
+      userCatchCollection: userCatch
+      catchCollection: catch
+      sumCatchCollection: sumCatch
+      competeAnalysisCollection: competeAnalysisResult
+      difficultAnalysisCollection: difficultAnalysisResult
+      timeAnalysisCollection: timeAnalysisResult
+      targetGraphCollection: targetGraph
+      base64Auth: Basic YWRtaW46Y2hhbmdlaXQ=
+
+oss:
+    bucketName:
+        dev: mooctest-dev
+        static: mooctest-mutation
+        main: mooctest-site-test
+        app: kikbug-public
+    bucket: mooctest-site-test
+
+server:
+    port: 9001
+
+rpcServer:
+    port: 9100
+    group: iselab
+    zkAddress: 118.178.131.206:2181
+
+logging.config: classpath:log4j2.online.yaml
+logging.access.directory: /home/shared/log
+
+spring.jpa.show-sql: false
+
+cookie:
+    encryptionKey: helloiselab@2017
+    domain: .mooctest.net
+
+host: http://test.mooctest.net
+
+webIDE:
+    address: 47.97.4.113:8000
+
+celeryServer:
+    host: 121.199.32.102
+    port: 5001
+
+---
+# 线上服务环境
+spring:
+    profiles: online
+    datasource:
+        url: jdbc:mysql://10.24.153.13/mooctest_main?useUnicode=yes&characterEncoding=UTF-8
+        username: liuzicong
+        password: secr3t!
+    dubbo:
+        application.name: dubbo-consumer-online
+        registry.address: zookeeper://118.178.131.206:2181
+        protocol.name: dubbo
+        protocol.port: 20880
+        protocol.host: 114.55.91.83
+        scan: cn.iselab.mooctest.site.rpc
+    rabbitmq:
+        host: 121.199.32.102
+        port: 5672
+        username: mooctest
+        password: mooctestPassword
+        virtual-host: proj
+    redis:
+        host: 114.55.91.27
+        port: 6379
+        password:
+        pool:
+            max-active: 8
+            max-wait: -1
+            max-idle: 8
+            min-idle: 0
+
+featureSwitch:
+    default:
+        role: worker
+    client:
+        sms: true
+        email: true
+        oss: true
+        webide: true
+    server:
+        rpcServerRunner: true
+        rpcDevService: true
+        rpcKibugService: true
+        rpcSourceService: true
+        mongoServer: true
+        UserService: true
+        enableRabbitListener: true
+
+mongodb:
+      host: 114.55.91.27
+      port: 80
+      db: testdb
+      reportCollection: report
+      mutationCollection: mutation
+      caseGraghCollection: caseGraph
+      caughtNodeCollection: caughtNode
+      userCatchCollection: userCatch
+      catchCollection: catch
+      sumCatchCollection: sumCatch
+      competeAnalysisCollection: competeAnalysisResult
+      difficultAnalysisCollection: difficultAnalysisResult
+      timeAnalysisCollection: timeAnalysisResult
+      targetGraphCollection: targetGraph
+      base64Auth: Basic YWRtaW46Y2hhbmdlaXQ=
+
+oss:
+    bucketName:
+        dev: mooctest-dev
+        static: mooctest-mutation
+        main: mooctest-site
+        app: kikbug-public
+    bucket: mooctest-site
+
+server:
+    port: 8088
+
+rpcServer:
+    port: 9100
+    group: iselab
+    zkAddress: 10.27.2.223:2181
+
+logging.config: classpath:log4j2.online.yaml
+logging.access.directory: /home/shared/log
+
+spring.jpa.show-sql: false
+
+cookie:
+    encryptionKey: helloiselab@2017
+    domain: .mooctest.net
+
+host: http://www.mooctest.net
+
+webIDE:
+    address: 47.97.4.113:8081
+
+celeryServer:
+    host: 121.199.32.102
+    port: 5000
+
 ---
 # 私有云服务环境
 spring:
@@ -35,18 +352,53 @@ featureSwitch:
         oss: false
         webide: false
     server:
+        rpcServerRunner: false
         rpcDevService: false
+        rpcKibugService: false
+        rpcSourceService: false
         mongoServer: false
         UserService: false
         enableRabbitListener: true
-        initExamScheduler: true
+
+mongodb:
+      host: 114.55.91.27
+      port: 80
+      db: testdb
+      reportCollection: report
+      mutationCollection: mutation
+      caseGraghCollection: caseGraph
+      caughtNodeCollection: caughtNode
+      userCatchCollection: userCatch
+      catchCollection: catch
+      sumCatchCollection: sumCatch
+      competeAnalysisCollection: competeAnalysisResult
+      difficultAnalysisCollection: difficultAnalysisResult
+      timeAnalysisCollection: timeAnalysisResult
+      targetGraphCollection: targetGraph
+      base64Auth:
 
 server:
     port: 9001
 
+rpcServer:
+    port: 9100
+    group: iselab
+    zkAddress: localhost:2181
+
 logging.config: classpath:log4j2.online.yaml
 logging.access.directory: /home/shared/log
 
 spring.jpa.show-sql: false
 
+cookie:
+    encryptionKey: helloiselab@2017
+    domain: .mooctest.net
+
 host: http://www.mooctest.net
+
+
+dubbo:
+    reference.id: UserService
+    interface: cn.iselab.mooctest.rpc.user.api.UserService
+    version: 1.0.15
+    timeout: 12000