mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 20:54:26 +08:00
feat:项目整合Sentinel完结
This commit is contained in:
parent
23b271338f
commit
f5e99abd41
@ -17,7 +17,7 @@ public class UserFeignFallbackClient implements UserFeignClient {
|
||||
|
||||
@Override
|
||||
public Result<UserDTO> getUserByUsername(String username) {
|
||||
log.error("Feign远程调用服务发生故障,获取用户信息失败降级");
|
||||
log.error("feign远程调用系统用户服务异常后的降级方法");
|
||||
return Result.failed(ResultCode.DEGRADATION);
|
||||
}
|
||||
}
|
||||
|
@ -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<SysUser>()
|
||||
.eq(SysUser::getUsername, username));
|
||||
|
||||
|
@ -31,7 +31,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AuthenticationManager authenticationManager() throws Exception {
|
||||
public AuthenticationManager authenticationManagerBean() throws Exception {
|
||||
return super.authenticationManagerBean();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user