浏览代码

Merge branch 'online' of http://git.dayaedu.com/yonge/cooleshow into zx_online_0422

zouxuan 11 月之前
父节点
当前提交
d6a3835376

+ 3 - 1
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/config/ResourceServerConfig.java

@@ -26,7 +26,9 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
 		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and()
-				.authorizeRequests().antMatchers(
+				.authorizeRequests()
+			.antMatchers("/open/**", "/*/open/**").permitAll()
+			.antMatchers(
 						"/task/**",
 				"/user/updatePassword",
 				"/user/noAuth/queryUserByPhone",

+ 25 - 0
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/OpenMutualTLSController.java

@@ -0,0 +1,25 @@
+package com.yonge.cooleshow.auth.web.controller;
+
+import com.microsvc.toolkit.common.response.template.R;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/open/mutualTLS")
+@Api(tags = "HTTPS双向认证")
+public class OpenMutualTLSController {
+
+    @ApiOperation(value = "HTTPS双向认证查询")
+    @GetMapping(value = "query")
+    public R<Boolean> queryByParamNameList() {
+        return R.from(true);
+    }
+
+}

+ 4 - 4
cooleshow-common/src/main/java/com/yonge/cooleshow/common/redis/config/RedisConfig.java

@@ -17,7 +17,7 @@ import java.io.Serializable;
 @Configuration
 public class RedisConfig {
 
-	@Value("${spring.redis.host}")
+	/*@Value("${spring.redis.host}")
 	private String host;
 	
 	@Value("${spring.redis.port}")
@@ -55,9 +55,9 @@ public class RedisConfig {
 		redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
 		redisTemplate.setConnectionFactory(jedisConnectionFactory);
 		return redisTemplate;
-	}
+	}*/
 
-	/*@Bean
+	@Bean
 	public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
 		// 定义redis模板
 		RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
@@ -71,6 +71,6 @@ public class RedisConfig {
 		redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
 		redisTemplate.afterPropertiesSet();
 		return redisTemplate;
-	}*/
+	}
 
 }

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/SmsCodeServiceImpl.java

@@ -82,7 +82,7 @@ public class SmsCodeServiceImpl implements SmsCodeService {
         String configValue = sysConfigService.findConfigValue(SysConfigConstant.SMS_SEND_VERIFY);
         if((StringUtils.isNotEmpty(configValue) && "1".equals(configValue)) || StringUtils.isNotBlank(code)) {
             if (StringUtils.isEmpty(mobile) || StringUtils.isEmpty(code)) {
-                throw new BizException("图形验证码错误");
+                throw new BizException("你所使用的不是最新版本,请更新后使用");
             }
             String redisKey = MessageTypeEnum.KAPTCHA_SESSION_KEY + mobile;
             if (redisTemplate.hasKey(redisKey)) {