Commit 312f38cc228fe671ae7705ba3075e336007f3000
1 parent
6e63c2ce
update
Showing
2 changed files
with
34 additions
and
154 deletions
src/main/java/com/cnlive/shenhe/ShenheApplication.java
| ... | ... | @@ -31,13 +31,21 @@ public class ShenheApplication extends SpringBootServletInitializer { |
| 31 | 31 | private static final String CAS_SERVER_URL_PREFIX = "https://user.cnlive.com/OpenSSO2"; |
| 32 | 32 | private static final String CAS_SERVER_LOGIN_URL = "https://user.cnlive.com/OpenSSO2/login"; |
| 33 | 33 | //本机的名称 |
| 34 | - private static final String SERVER_NAME = "http://shen.cnlive.com:81"; | |
| 34 | + private static final String SERVER_NAME = "http://test.shen.cnlive.com:82"; | |
| 35 | 35 | |
| 36 | 36 | //登录入口 |
| 37 | - private static final String SERVICE_LOGIN = "http://shen.cnlive.com:81/users/login"; | |
| 37 | + private static final String SERVICE_LOGIN = "http://test.shen.cnlive.com:82/users/login"; | |
| 38 | 38 | |
| 39 | 39 | //登出 |
| 40 | - private static final String SERVICE_LOGINOUT = "http://shen.cnlive.com:81/users/logout"; | |
| 40 | + private static final String SERVICE_LOGINOUT = "http://test.shen.cnlive.com:82/users/logout"; | |
| 41 | + | |
| 42 | + public static void main(String[] args) { | |
| 43 | +// SpringApplication.run(ShenheApplication.class, args); | |
| 44 | + SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); | |
| 45 | + builder.headless(true).run(args); | |
| 46 | + // 设置Headless模式,linux系统下 | |
| 47 | + System.setProperty("java.awt.headless", "true"); | |
| 48 | + } | |
| 41 | 49 | |
| 42 | 50 | |
| 43 | 51 | /** |
| ... | ... | @@ -137,124 +145,6 @@ public class ShenheApplication extends SpringBootServletInitializer { |
| 137 | 145 | return registration; |
| 138 | 146 | } |
| 139 | 147 | |
| 140 | - | |
| 141 | - /** | |
| 142 | - * 登录过滤器 | |
| 143 | - * @return | |
| 144 | - */ | |
| 145 | - /* @Bean | |
| 146 | - public FilterRegistrationBean filterSingleRegistration() { | |
| 147 | - FilterRegistrationBean registration = new FilterRegistrationBean(); | |
| 148 | - registration.setFilter(new SingleSignOutFilter()); | |
| 149 | - // 设定匹配的路径 | |
| 150 | - registration.addUrlPatterns("/*"); | |
| 151 | - Map<String,String> initParameters = new HashMap<String, String>(); | |
| 152 | - initParameters.put("casServerUrlPrefix", CAS_SERVER_URL_PREFIX); | |
| 153 | - registration.setInitParameters(initParameters); | |
| 154 | - // 设定加载的顺序 | |
| 155 | - registration.setOrder(1); | |
| 156 | - return registration; | |
| 157 | - } | |
| 158 | - | |
| 159 | - *//** | |
| 160 | - * 过滤验证器 | |
| 161 | - * @return | |
| 162 | - *//* | |
| 163 | - @Bean | |
| 164 | - public FilterRegistrationBean filterValidationRegistration() { | |
| 165 | - FilterRegistrationBean registration = new FilterRegistrationBean(); | |
| 166 | - registration.setFilter(new Cas30ProxyReceivingTicketValidationFilter()); | |
| 167 | - // 设定匹配的路径 | |
| 168 | - registration.addUrlPatterns("/*"); | |
| 169 | - Map<String,String> initParameters = new HashMap<String, String>(); | |
| 170 | - initParameters.put("casServerUrlPrefix", CAS_SERVER_URL_PREFIX); | |
| 171 | - initParameters.put("serverName", SERVER_NAME); | |
| 172 | - initParameters.put("useSession", "true"); | |
| 173 | - registration.setInitParameters(initParameters); | |
| 174 | - // 设定加载的顺序 | |
| 175 | - registration.setOrder(1); | |
| 176 | - return registration; | |
| 177 | - } | |
| 178 | - | |
| 179 | - *//** | |
| 180 | - * 授权过滤器 | |
| 181 | - * @return | |
| 182 | - *//* | |
| 183 | - *//*@Bean | |
| 184 | - public FilterRegistrationBean filterAuthenticationRegistration() { | |
| 185 | - FilterRegistrationBean registration = new FilterRegistrationBean(); | |
| 186 | - registration.setFilter(new AuthenticationFilter()); | |
| 187 | - // 设定匹配的路径 | |
| 188 | - registration.addUrlPatterns("/*"); | |
| 189 | - Map<String,String> initParameters = new HashMap<String, String>(); | |
| 190 | - initParameters.put("casServerLoginUrl", CAS_SERVER_URL_PREFIX); | |
| 191 | - initParameters.put("server", SERVICE_LOGIN); | |
| 192 | - | |
| 193 | - //initParameters.put("ignorePattern", ".*"); | |
| 194 | - //表示过滤所有 | |
| 195 | - //initParameters.put("ignoreUrlPatternType", "com.cnlive.shenhe.config.SimpleUrlPatternMatcherStrategy"); | |
| 196 | - | |
| 197 | - registration.setInitParameters(initParameters); | |
| 198 | - // 设定加载的顺序 | |
| 199 | - registration.setOrder(1); | |
| 200 | - return registration; | |
| 201 | - }*//* | |
| 202 | - | |
| 203 | - *//** | |
| 204 | - * wraper过滤器 | |
| 205 | - * @return | |
| 206 | - *//* | |
| 207 | - @Bean | |
| 208 | - public FilterRegistrationBean filterWrapperRegistration() { | |
| 209 | - FilterRegistrationBean registration = new FilterRegistrationBean(); | |
| 210 | - registration.setFilter(new HttpServletRequestWrapperFilter()); | |
| 211 | - // 设定匹配的路径 | |
| 212 | - registration.addUrlPatterns("/*"); | |
| 213 | - // 设定加载的顺序 | |
| 214 | - registration.setOrder(1); | |
| 215 | - return registration; | |
| 216 | - } | |
| 217 | - | |
| 218 | - *//** | |
| 219 | - * 添加监听器 | |
| 220 | - * @return | |
| 221 | - *//* | |
| 222 | - @Bean | |
| 223 | - public ServletListenerRegistrationBean<EventListener> singleSignOutListenerRegistration(){ | |
| 224 | - ServletListenerRegistrationBean<EventListener> registrationBean = new ServletListenerRegistrationBean<EventListener>(); | |
| 225 | - registrationBean.setListener(new SingleSignOutHttpSessionListener()); | |
| 226 | - registrationBean.setOrder(1); | |
| 227 | - return registrationBean; | |
| 228 | - } | |
| 229 | - | |
| 230 | - */ | |
| 231 | - | |
| 232 | - /** | |
| 233 | - * 设定首页 | |
| 234 | - *//* | |
| 235 | - @Configuration | |
| 236 | - public class DefaultView extends WebMvcConfigurerAdapter { | |
| 237 | - | |
| 238 | - @Override | |
| 239 | - public void addViewControllers(ViewControllerRegistry registry) { | |
| 240 | - //设定首页为index | |
| 241 | - registry.addViewController("/").setViewName("forward:/users/index"); | |
| 242 | - | |
| 243 | - //设定匹配的优先级 | |
| 244 | - registry.setOrder(Ordered.HIGHEST_PRECEDENCE); | |
| 245 | - | |
| 246 | - //添加视图控制类 | |
| 247 | - super.addViewControllers(registry); | |
| 248 | - } | |
| 249 | - }*/ | |
| 250 | - public static void main(String[] args) { | |
| 251 | -// SpringApplication.run(ShenheApplication.class, args); | |
| 252 | - SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); | |
| 253 | - builder.headless(true).run(args); | |
| 254 | - // 设置Headless模式,linux系统下 | |
| 255 | - System.setProperty("java.awt.headless", "true"); | |
| 256 | - } | |
| 257 | - | |
| 258 | 148 | /** |
| 259 | 149 | * 配置内部类 |
| 260 | 150 | */ | ... | ... |
src/main/resources/application.properties
| 1 | -#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | |
| 2 | -#spring.datasource.username=root | |
| 3 | -#spring.datasource.password=nbLdyO.79 | |
| 4 | - | |
| 5 | -#\u91D1\u5C71\u4E00\u533A\u6570\u636E\u5E93 | |
| 6 | -#spring.datasource.url=jdbc:mysql://10.137.192.2:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | |
| 7 | -#spring.datasource.username=admin | |
| 8 | -#spring.datasource.password=Sre#45iU7kJ | |
| 9 | - | |
| 10 | -#\u91D1\u5C71\u516D\u533A\u6570\u636E\u5E93 | |
| 11 | -spring.datasource.url=jdbc:mysql://10.137.192.7:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false | |
| 12 | -spring.datasource.username=admin | |
| 13 | -spring.datasource.password=83BwiCoq | |
| 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! | |
| 14 | 4 | |
| 15 | 5 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver |
| 16 | 6 | |
| ... | ... | @@ -37,13 +27,13 @@ spring.thymeleaf.cache=false |
| 37 | 27 | |
| 38 | 28 | mybatis.mapper-locations=classpath:mapper/*.xml |
| 39 | 29 | mybatis.type-aliases-package=com.cnlive.shenhe.entity |
| 40 | -server.port=81 | |
| 30 | +server.port=82 | |
| 41 | 31 | |
| 42 | 32 | #rabbitmq\u76F8\u5173\u914D\u7F6E |
| 43 | -spring.rabbitmq.host=10.254.176.11 | |
| 33 | +spring.rabbitmq.host=10.254.174.131 | |
| 44 | 34 | spring.rabbitmq.port=5672 |
| 45 | -spring.rabbitmq.username=admin | |
| 46 | -spring.rabbitmq.password=fA{5Uikx7 | |
| 35 | +spring.rabbitmq.username=test | |
| 36 | +spring.rabbitmq.password=p3~amKKt9 | |
| 47 | 37 | # \u5F00\u542F\u53D1\u9001\u786E\u8BA4 |
| 48 | 38 | spring.rabbitmq.publisher-confirms=true |
| 49 | 39 | # \u5F00\u542F\u53D1\u9001\u5931\u8D25\u9000\u56DE |
| ... | ... | @@ -62,8 +52,8 @@ spring.mvc.favicon.enabled = false |
| 62 | 52 | speak_comment=http://comment.cnlive.com/services/commentForTopic/muted |
| 63 | 53 | |
| 64 | 54 | #logback\u65E5\u5FD7\u4E2D\u4F7F\u7528 |
| 65 | -spring.application.name=cnlive_shenhe | |
| 66 | -spring.application.home=/usr/local/cnlive_shenhe/log | |
| 55 | +spring.application.name=cnlive_shenhe_test | |
| 56 | +spring.application.home=/usr/local/test_cnlive_shenhe/cnlive_shenhe/log | |
| 67 | 57 | |
| 68 | 58 | sync_users_api=http://api.cnlive.com/open/api2/inner2/shenhe/getuser |
| 69 | 59 | sync_users_app_key=314a9dd4-a9b7-4c12-bbbe-1150a36491ae |
| ... | ... | @@ -78,16 +68,16 @@ platformKey =AUDIT |
| 78 | 68 | platformValue=10011438 |
| 79 | 69 | |
| 80 | 70 | #\u672C\u673A\u5730\u5740 |
| 81 | -spring.localhost.url=http://shen.cnlive.com | |
| 71 | +spring.localhost.url=http://test.shen.cnlive.com | |
| 82 | 72 | |
| 83 | 73 | #\u62BD\u5E27\u5E38\u91CF |
| 84 | 74 | avsmple_appKey=1eac30dfbee311e7a2f0fa163e771cf9 |
| 85 | 75 | avsmple_appSecret=28ce1e1fbee311e7a2f0fa163e771cf92ea58ebfbee311e7a2f0fa163e771cf9 |
| 86 | -avsmple_url=http://transcode.cnlive.com/api/request | |
| 87 | -avsmple_callback=http://shen.cnlive.com/api/avsample/callback | |
| 76 | +avsmple_url=http://test.transcode.cnlive.com/api/request | |
| 77 | +avsmple_callback=http://test.shen.cnlive.com/api/avsample/callback | |
| 88 | 78 | |
| 89 | 79 | #\u540C\u6B65\u76F4\u64AD\u4E91\u4FE1\u606F |
| 90 | -live_url=http://bc.cnlive.com/bokong/activity/activityShenHe | |
| 80 | +live_url=http://test.bc.cnlive.com/bokong/activity/activityShenHe | |
| 91 | 81 | |
| 92 | 82 | #\u90AE\u4EF6\u4F7F\u7528\u5E38\u91CF |
| 93 | 83 | email_app_id=769_jetja50p18 |
| ... | ... | @@ -95,17 +85,17 @@ email_app_key=ad101b9152817a79b5c33c3617b96ff91385096ff3b4ba |
| 95 | 85 | email_send_URL=http://sms.cnlive.com/CnliveM3/email/sendMoreVarEmail.action |
| 96 | 86 | |
| 97 | 87 | #\u62BD\u5E27\u5B58\u653Ebucket\u548C\u57DF\u540D |
| 98 | -#qn_bucket=cnlivetest | |
| 99 | -#qn_domain=http://test.qnvod.cnlive.com | |
| 100 | -#ks_bucket=cnlive-test | |
| 101 | -#ks_domain=http://test.wideo.cnlive.com | |
| 88 | +qn_bucket=cnlivetest | |
| 89 | +qn_domain=http://test.qnvod.cnlive.com | |
| 90 | +ks_bucket=cnlive-test | |
| 91 | +ks_domain=http://test.wideo.cnlive.com | |
| 102 | 92 | |
| 103 | -qn_bucket=mam-sxzg-82 | |
| 104 | -qn_domain=http://sxzg.ys2.cnliveimg.com | |
| 105 | -ks_bucket=mam-sxzg-82 | |
| 106 | -ks_domain=http://sxzg.ys1.cnliveimg.com | |
| 93 | +#qn_bucket=mam-sxzg-82 | |
| 94 | +#qn_domain=http://sxzg.ys2.cnliveimg.com | |
| 95 | +#ks_bucket=mam-sxzg-82 | |
| 96 | +#ks_domain=http://sxzg.ys1.cnliveimg.com | |
| 107 | 97 | |
| 108 | 98 | #\u56FE\u7247\u5B58\u653E\u6839\u8DEF\u5F84 |
| 109 | 99 | desdir=shen |
| 110 | -yiDun_audio_callback=http://shen.cnlive.com/api/audio/callbackAudio | |
| 111 | -cms_getVideoAndLiveId=http://cms.cnlive.com:8768/contentApi/getBeanById | |
| 112 | 100 | \ No newline at end of file |
| 101 | +yiDun_audio_callback=http://test.shen.cnlive.com/api/audio/callbackAudio | |
| 102 | +cms_getVideoAndLiveId=http://cmstest.cnlive.com:8768/contentApi/getBeanById | ... | ... |