Commit 5ab7117675da986c1b9c2e29a92cb0e2089c976c
Merge commit '172a15a1'
Showing
4 changed files
with
17 additions
and
14 deletions
pom.xml
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <modelVersion>4.0.0</modelVersion> | 4 | <modelVersion>4.0.0</modelVersion> |
| 5 | 5 | ||
| 6 | <groupId>com.cnlive.shenhe</groupId> | 6 | <groupId>com.cnlive.shenhe</groupId> |
| 7 | - <artifactId>cnlive_shenhe</artifactId> | 7 | + <artifactId>cnlive_shenhe_test</artifactId> |
| 8 | <version>0.0.1-SNAPSHOT</version> | 8 | <version>0.0.1-SNAPSHOT</version> |
| 9 | <packaging>jar</packaging> | 9 | <packaging>jar</packaging> |
| 10 | 10 |
src/main/java/com/cnlive/shenhe/ShenheApplication.java
| @@ -23,13 +23,13 @@ public class ShenheApplication extends SpringBootServletInitializer { | @@ -23,13 +23,13 @@ public class ShenheApplication extends SpringBootServletInitializer { | ||
| 23 | private static final String CAS_SERVER_URL_PREFIX = "https://user.cnlive.com/OpenSSO2"; | 23 | private static final String CAS_SERVER_URL_PREFIX = "https://user.cnlive.com/OpenSSO2"; |
| 24 | private static final String CAS_SERVER_LOGIN_URL = "https://user.cnlive.com/OpenSSO2/login"; | 24 | private static final String CAS_SERVER_LOGIN_URL = "https://user.cnlive.com/OpenSSO2/login"; |
| 25 | //本机的名称 | 25 | //本机的名称 |
| 26 | - private static final String SERVER_NAME = "http://shen.cnlive.com:81"; | 26 | + private static final String SERVER_NAME = "http://test.shen.cnlive.com:82"; |
| 27 | 27 | ||
| 28 | //登录入口 | 28 | //登录入口 |
| 29 | - private static final String SERVICE_LOGIN = "http://shen.cnlive.com:81/users/login"; | 29 | + private static final String SERVICE_LOGIN = "http://test.shen.cnlive.com:82/users/login"; |
| 30 | 30 | ||
| 31 | //登出 | 31 | //登出 |
| 32 | - private static final String SERVICE_LOGINOUT = "http://shen.cnlive.com:81/users/logout"; | 32 | + private static final String SERVICE_LOGINOUT = "http://test.shen.cnlive.com:82/users/logout"; |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | /** | 35 | /** |
src/main/java/com/cnlive/shenhe/controller/UsersController.java
| @@ -37,7 +37,7 @@ public class UsersController { | @@ -37,7 +37,7 @@ public class UsersController { | ||
| 37 | public String index(HttpServletRequest request) { | 37 | public String index(HttpServletRequest request) { |
| 38 | AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal(); | 38 | AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal(); |
| 39 | if (CommonUtils.isNull(principal)) { | 39 | if (CommonUtils.isNull(principal)) { |
| 40 | - return "redirect:https://user.cnlive.com/OpenSSO2/login?service=http://shen.cnlive.com/users/login"; | 40 | + return "redirect:https://user.cnlive.com/OpenSSO2/login?service=http://test.shen.cnlive.com/users/login"; |
| 41 | } | 41 | } |
| 42 | //用户ID | 42 | //用户ID |
| 43 | String id = principal.getName(); | 43 | String id = principal.getName(); |
| @@ -53,7 +53,7 @@ public class UsersController { | @@ -53,7 +53,7 @@ public class UsersController { | ||
| 53 | sessionUser.setLogo(user.getUser_logo()); | 53 | sessionUser.setLogo(user.getUser_logo()); |
| 54 | sessionUser.setMaster(user.getMaster()); | 54 | sessionUser.setMaster(user.getMaster()); |
| 55 | request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); | 55 | request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); |
| 56 | - return "redirect:http://shen.cnlive.com/videos/page"; | 56 | + return "redirect:http://test.shen.cnlive.com/videos/page"; |
| 57 | } | 57 | } |
| 58 | } | 58 | } |
| 59 | return "page/error.html"; | 59 | return "page/error.html"; |
| @@ -62,7 +62,7 @@ public class UsersController { | @@ -62,7 +62,7 @@ public class UsersController { | ||
| 62 | @RequestMapping("/logout") | 62 | @RequestMapping("/logout") |
| 63 | public String logout(HttpSession session) { | 63 | public String logout(HttpSession session) { |
| 64 | session.invalidate(); | 64 | session.invalidate(); |
| 65 | - return "redirect:https://user.cnlive.com/OpenSSO2/logout?service=http://shen.cnlive.com/users/login"; | 65 | + return "redirect:https://user.cnlive.com/OpenSSO2/logout?service=http://test.shen.cnlive.com/users/login"; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | 68 |
src/main/resources/application.properties
| 1 | -#spring.datasource.url=jdbc:mysql://120.92.102.31:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | ||
| 2 | -#spring.datasource.username=root | ||
| 3 | -#spring.datasource.password=M345sdfss4! | ||
| 4 | -spring.datasource.url=jdbc:mysql://10.137.192.2:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | ||
| 5 | -spring.datasource.username=admin | ||
| 6 | -spring.datasource.password=Sre#45iU7kJ | 1 | +spring.datasource.url=jdbc:mysql://120.92.102.31:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false |
| 2 | +spring.datasource.username=root | ||
| 3 | +spring.datasource.password=M345sdfss4! | ||
| 4 | +#spring.datasource.url=jdbc:mysql://10.137.192.2:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | ||
| 5 | +#spring.datasource.username=admin | ||
| 6 | +#spring.datasource.password=Sre#45iU7kJ | ||
| 7 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver | 7 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver |
| 8 | 8 | ||
| 9 | +server.tomcat.protocol_header=x-forwarded-proto | ||
| 10 | +server.use-forward-headers=true | ||
| 11 | + | ||
| 9 | spring.jpa.properties.hibernate.hbm2ddl.auto=update | 12 | spring.jpa.properties.hibernate.hbm2ddl.auto=update |
| 10 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect | 13 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect |
| 11 | spring.jpa.show-sql= true | 14 | spring.jpa.show-sql= true |
| @@ -23,7 +26,7 @@ spring.thymeleaf.cache=false | @@ -23,7 +26,7 @@ spring.thymeleaf.cache=false | ||
| 23 | 26 | ||
| 24 | mybatis.mapper-locations=classpath:mapping/*.xml | 27 | mybatis.mapper-locations=classpath:mapping/*.xml |
| 25 | mybatis.type-aliases-package=com.cnlive.shenhe.entity | 28 | mybatis.type-aliases-package=com.cnlive.shenhe.entity |
| 26 | -server.port=81 | 29 | +server.port=82 |
| 27 | 30 | ||
| 28 | sync_users_api=http://api.cnlive.com/open/api2/inner2/shenhe/getuser | 31 | sync_users_api=http://api.cnlive.com/open/api2/inner2/shenhe/getuser |
| 29 | sync_users_app_key=314a9dd4-a9b7-4c12-bbbe-1150a36491ae | 32 | sync_users_app_key=314a9dd4-a9b7-4c12-bbbe-1150a36491ae |