diff --git a/README.md b/README.md index 093a35872..41bab8cf7 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,8 @@ youlai-mall 1. **启动`Nacos`服务** - IDEA下方工具栏点击Terminal终端命令行,执行`cd youlai-registry/nacos/bin`命令切换到Nacos的启动脚本文件夹下,然后执行`startup -m standalone`命令启动Nacos服务; + IDEA下方工具栏点击Terminal终端命令行,执行`cd youlai-middleware/nacos/bin`命令切换到Nacos的启动脚本文件夹下,然后执行`startup -m + standalone`命令启动Nacos服务; 2. **启动平台基础服务** diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java index e89c7543c..40747beab 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java @@ -18,6 +18,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; import org.apache.logging.log4j.util.Strings; @@ -43,7 +44,7 @@ public class AuthController { private TokenEndpoint tokenEndpoint; - @ApiOperation(value = "OAuth2认证",notes = "login") + @ApiOperation(value = "OAuth2认证", notes = "login") @ApiImplicitParams({ @ApiImplicitParam(name = "grant_type", defaultValue = "password", value = "授权模式", required = true), @ApiImplicitParam(name = "client_id", defaultValue = "client", value = "Oauth2客户端ID", required = true), @@ -88,6 +89,7 @@ public class AuthController { private UmsMemberFeignService memberFeignService; private PasswordEncoder passwordEncoder; + @SneakyThrows public OAuth2AccessToken handleForWxAuth(Principal principal, Map parameters) throws HttpRequestMethodNotSupportedException { String code = parameters.get("code"); @@ -97,12 +99,8 @@ public class AuthController { } WxMaJscode2SessionResult session = null; - try { - // 根据授权code获取微信用户信息 - session = wxService.getUserService().getSessionInfo(code); - } catch (WxErrorException e) { - e.printStackTrace(); - } + // 根据授权code获取微信用户信息 + session = wxService.getUserService().getSessionInfo(code); String openid = session.getOpenid(); String sessionKey = session.getSessionKey(); diff --git a/youlai-common/common-web/src/main/resources/logback-spring.xml b/youlai-common/common-web/src/main/resources/logback-spring.xml index 18efe3640..df1e36730 100644 --- a/youlai-common/common-web/src/main/resources/logback-spring.xml +++ b/youlai-common/common-web/src/main/resources/logback-spring.xml @@ -54,11 +54,15 @@ 5 minutes - - + + + + + + diff --git a/youlai-gateway/src/main/resources/bootstrap-dev.yml b/youlai-gateway/src/main/resources/bootstrap-dev.yml index d51af5968..b286bbf6c 100644 --- a/youlai-gateway/src/main/resources/bootstrap-dev.yml +++ b/youlai-gateway/src/main/resources/bootstrap-dev.yml @@ -14,6 +14,7 @@ spring: server-addr: ${spring.cloud.nacos.discovery.server-addr} file-extension: yaml sentinel: + enabled: false eager: true transport: dashboard: localhost:8080 @@ -34,6 +35,6 @@ spring: groupId: SENTINEL_GROUP data-type: json rule-type: gw-api-group - enabled: false +