@ApiOperation("账号登录")
    @PostMapping("/usernameLogin")
    public ApiResult usernameLogin(@RequestParam String username, @RequestParam String password){
        UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);
        //Authentication authentication = authenticationManagerBuilder.getObject().authenticate(token);
        Authentication authentication = authenticationManager.authenticate(token);
        SecurityContextHolder.getContext().setAuthentication(authentication);
        RequestContextHolderSupport.getRequest().getSession().setAttribute(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY, SecurityContextHolder.getContext());
        return ApiResult.success().message("登陆成功").data(authentication.getPrincipal());
    }
@Test
    void usernameLogin() {
        System.out.println(new BCryptPasswordEncoder().encode("aa0000"));
        System.out.println(PasswordEncoderFactories.createDelegatingPasswordEncoder().encode("aa0000"));
    }