diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/fallback/UserFeignFallbackClient.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/fallback/UserFeignFallbackClient.java index 440133647..9682b28b6 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/fallback/UserFeignFallbackClient.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/fallback/UserFeignFallbackClient.java @@ -17,7 +17,7 @@ public class UserFeignFallbackClient implements UserFeignClient { @Override public Result getUserByUsername(String username) { - log.error("Feign远程调用服务发生故障,获取用户信息失败降级"); + log.error("feign远程调用系统用户服务异常后的降级方法"); return Result.failed(ResultCode.DEGRADATION); } } diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java index 01ed0419b..703fd4d59 100644 --- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java +++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java @@ -142,11 +142,7 @@ public class UserController extends BaseController { @ApiOperation(value = "根据用户名获取用户信息") @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "path", dataType = "String") @GetMapping("/username/{username}") - public Result getUserByUsername( - @PathVariable String username - ) { - log.info("进入getUserByUsername方法"); - int i = 1 / 0; + public Result getUserByUsername(@PathVariable String username) { SysUser user = iSysUserService.getOne(new LambdaQueryWrapper() .eq(SysUser::getUsername, username)); diff --git a/youlai-auth/src/main/java/com/youlai/auth/config/WebSecurityConfig.java b/youlai-auth/src/main/java/com/youlai/auth/config/WebSecurityConfig.java index 8570009e8..c9b45cc95 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/config/WebSecurityConfig.java +++ b/youlai-auth/src/main/java/com/youlai/auth/config/WebSecurityConfig.java @@ -31,7 +31,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { } @Bean - public AuthenticationManager authenticationManager() throws Exception { + public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); }