@PostMapping("/signin")
public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {
    System.out.println("a"+loginRequest.getUsername()+loginRequest.getPassword());
    Authentication authentication = authenticationManager.authenticate(
            new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));
    System.out.println("a"+loginRequest.getUsername()+loginRequest.getPassword());
   // new RuntimeException("Error: cccccc is not found.");
    SecurityContextHolder.getContext().setAuthentication(authentication);
    String jwt = jwtUtils.generateJwtToken(authentication);
   new RuntimeException("Error: cccccc is not found."+ jwt);
    //    new RuntimeException("Error: cccccc is not found.");
    UserDetailslmpl userDetails = (UserDetailslmpl) authentication.getPrincipal();
    List<String> roles = userDetails.getAuthorities().stream()
            .map(item -> item.getAuthority())
            .collect(Collectors.toList());
   // new RuntimeException("Error: aaaa is not found.");
    return ResponseEntity.ok(new JwtResponse(jwt,
            userDetails.getId(),
            userDetails.getUsername(),
            userDetails.getEmail(),
            roles));
}
 
    