Browse Source

20190311 - fix

薛晓波 6 years ago
parent
commit
54ec76a1ac

+ 1 - 1
mooctest-user-server/src/main/java/cn/iselab/mooctest/user/web/ctrl/PageController.java

@@ -142,7 +142,7 @@ public class PageController extends BaseController{
             return "third_party_bind";
         }
         HttpSession session = request.getSession();
-        UserDTO user = userLogic.getUserById(((UserThirdParty)result.getData()).getId());
+        UserDTO user = userLogic.getUserById(((UserThirdParty)result.getData()).getUserId());
         session.setAttribute("userId", user.getId());
         session.setAttribute("userName", user.getEmail());
         String redirectUrl = (String)request.getSession().getAttribute("redirectURL");

+ 147 - 147
mooctest-user-server/src/main/resources/application.yaml

@@ -1,147 +1,147 @@
-spring.profiles.active: dev
-
-spring:
-    cache:
-        guava:
-            spec: expireAfterWrite=30s
-    datasource:
-        driver-class-name: com.mysql.jdbc.Driver
-        # Keep the connection alive if idle for a long time (needed in production)
-        testWhileIdle: true
-        validationQuery: SELECT 1
-    # Show or not log for each sql query
-    jpa:
-        show-sql: true
-    # Hibernate ddl auto (create, create-drop, update)
-    hibernate:
-        ddl-auto: validate
-        #hbm2ddl.auto: update
-        # Naming strategy
-        naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
-    # The SQL dialect makes Hibernate generate better SQL for the chosen database
-    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
-    thymeleaf:
-        content-type: text/html
-        mode: LEGACYHTML5
-        suffix: .html
-        prefix: classpath:/templates/
-        encoding: UTF-8
-        cache: false
-#        enabled: true
-#    session:``
-#        stroe-type: redis
-
-wechat:
-    appId: wx60f06d61f21804be
-    appSecret: f84db4dc62377926624093b49ac3be1f
-
-github:
-    clientId: 4e8e65b7e3bdeee9229b
-    clientSecret: a77f1ea04c6f370ec2ad295e29f307565658f8c3
-
-mybatis:
-    typeAliasesPackage: cn.iselab.mooctest.user.model
-    configuration:
-        map-underscore-to-camel-case: true
-
----
-# 开发环境
-spring:
-    profiles: dev
-    datasource:
-        driverClassName: com.mysql.jdbc.Driver
-        url: jdbc:mysql://111.231.143.6:3306/mooctest_user_service?useUnicode=yes&characterEncoding=UTF-8&serverTimezone=GMT%2B8
-        username: root
-        password: xuexiaobo.
-
-    dubbo:
-        application.name: user-service-provider
-        registry.address: zookeeper://101.37.175.111:2181
-        protocol.name: dubbo
-        protocol.port: 20900
-#        protocol.host: 127.0.0.1
-        scan: cn.iselab.mooctest.user.rpc
-        monitor.protocal: registry
-        provider.timeout: 120000
-        provider.retries: 0
-
-    redis:
-        host: 114.55.91.27
-        port: 6379
-        pool:
-            max-idle: 8
-            min-idle: 0
-            max-wait: -1
-            max-active: 8
-        database: 2
-#        host: localhost
-#        host: 111.231.143.6
-
-mail:
-    host: smtp.126.com
-    username: diors_po@126.com
-    password: xxb19970213
-    default-encoding: UTF-8
-
-
-
-server:
-    port: 8081
-
-logging.config: classpath:log4j2.yaml
-
----
-# 测试服务环境
-spring:
-    profiles: test
-    datasource:
-        url: jdbc:mysql://101.37.175.111:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8 # please modify manually
-        username: mooctest # please modify manually
-        password: secr3t! # please modify manually
-
-    dubbo:
-        application.name: user-service-provider
-        registry.address: zookeeper://101.37.175.111:2181
-        protocol.name: dubbo
-        protocol.port: 20900
-        protocol.host: 101.37.175.111
-        scan: cn.iselab.mooctest.user.rpc
-        monitor.protocal: registry
-        provider.timeout: 300000
-        provider.retries: 0
-
-server:
-    port: 8191
-
-logging.config: classpath:log4j2.test.yaml
-logging.access.directory: /home/share/log
-
-spring.jpa.show-sql: false
-
----
-# 线上服务环境
-spring:
-    profiles: online
-    datasource:
-        url: jdbc:mysql://10.24.153.13:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8
-        username: mooctest
-        password: secr3t!
-
-    dubbo:
-        application.name: user-service-provider
-        registry.address: zookeeper://118.178.131.206:2181
-        protocol.name: dubbo
-        protocol.port: 20890
-        protocol.host: 114.55.91.83
-        scan: cn.iselab.mooctest.user.rpc
-        monitor.protocal: registry
-        provider.timeout: 120000
-        provider.retries: 0
-
-server:
-    port: 8191
-
-logging.config: classpath:log4j2.online.yaml
-logging.access.directory: /home/share/log
-
-spring.jpa.show-sql: false
+#spring.profiles.active: dev
+#
+#spring:
+#    cache:
+#        guava:
+#            spec: expireAfterWrite=30s
+#    datasource:
+#        driver-class-name: com.mysql.jdbc.Driver
+#        # Keep the connection alive if idle for a long time (needed in production)
+#        testWhileIdle: true
+#        validationQuery: SELECT 1
+#    # Show or not log for each sql query
+#    jpa:
+#        show-sql: true
+#    # Hibernate ddl auto (create, create-drop, update)
+#    hibernate:
+#        ddl-auto: validate
+#        #hbm2ddl.auto: update
+#        # Naming strategy
+#        naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+#    # The SQL dialect makes Hibernate generate better SQL for the chosen database
+#    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
+#    thymeleaf:
+#        content-type: text/html
+#        mode: LEGACYHTML5
+#        suffix: .html
+#        prefix: classpath:/templates/
+#        encoding: UTF-8
+#        cache: false
+##        enabled: true
+##    session:``
+##        stroe-type: redis
+#
+#wechat:
+#    appId: wx60f06d61f21804be
+#    appSecret: f84db4dc62377926624093b49ac3be1f
+#
+#github:
+#    clientId: 4e8e65b7e3bdeee9229b
+#    clientSecret: a77f1ea04c6f370ec2ad295e29f307565658f8c3
+#
+#mybatis:
+#    typeAliasesPackage: cn.iselab.mooctest.user.model
+#    configuration:
+#        map-underscore-to-camel-case: true
+#
+#---
+## 开发环境
+#spring:
+#    profiles: dev
+#    datasource:
+#        driverClassName: com.mysql.jdbc.Driver
+#        url: jdbc:mysql://111.231.143.6:3306/mooctest_user_service?useUnicode=yes&characterEncoding=UTF-8&serverTimezone=GMT%2B8
+#        username: root
+#        password: xuexiaobo.
+#
+#    dubbo:
+#        application.name: user-service-provider
+#        registry.address: zookeeper://101.37.175.111:2181
+#        protocol.name: dubbo
+#        protocol.port: 20900
+##        protocol.host: 127.0.0.1
+#        scan: cn.iselab.mooctest.user.rpc
+#        monitor.protocal: registry
+#        provider.timeout: 120000
+#        provider.retries: 0
+#
+#    redis:
+#        host: 114.55.91.27
+#        port: 6379
+#        pool:
+#            max-idle: 8
+#            min-idle: 0
+#            max-wait: -1
+#            max-active: 8
+#        database: 2
+##        host: localhost
+##        host: 111.231.143.6
+#
+#mail:
+#    host: smtp.126.com
+#    username: diors_po@126.com
+#    password: xxb19970213
+#    default-encoding: UTF-8
+#
+#
+#
+#server:
+#    port: 8081
+#
+#logging.config: classpath:log4j2.yaml
+#
+#---
+## 测试服务环境
+#spring:
+#    profiles: test
+#    datasource:
+#        url: jdbc:mysql://101.37.175.111:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8 # please modify manually
+#        username: mooctest # please modify manually
+#        password: secr3t! # please modify manually
+#
+#    dubbo:
+#        application.name: user-service-provider
+#        registry.address: zookeeper://101.37.175.111:2181
+#        protocol.name: dubbo
+#        protocol.port: 20900
+#        protocol.host: 101.37.175.111
+#        scan: cn.iselab.mooctest.user.rpc
+#        monitor.protocal: registry
+#        provider.timeout: 300000
+#        provider.retries: 0
+#
+#server:
+#    port: 8191
+#
+#logging.config: classpath:log4j2.test.yaml
+#logging.access.directory: /home/share/log
+#
+#spring.jpa.show-sql: false
+#
+#---
+## 线上服务环境
+#spring:
+#    profiles: online
+#    datasource:
+#        url: jdbc:mysql://10.24.153.13:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8
+#        username: mooctest
+#        password: secr3t!
+#
+#    dubbo:
+#        application.name: user-service-provider
+#        registry.address: zookeeper://118.178.131.206:2181
+#        protocol.name: dubbo
+#        protocol.port: 20890
+#        protocol.host: 114.55.91.83
+#        scan: cn.iselab.mooctest.user.rpc
+#        monitor.protocal: registry
+#        provider.timeout: 120000
+#        provider.retries: 0
+#
+#server:
+#    port: 8191
+#
+#logging.config: classpath:log4j2.online.yaml
+#logging.access.directory: /home/share/log
+#
+#spring.jpa.show-sql: false