@GetMapping("/ListarUsuario")
	public List<Usuario> listarUsuario() {
        return usrService.listar();
    }
me da esto - [
  {
    "idusuario": 1,
    "apellido": "malcedo",
    "dni": "27895641",
    "email": "john@gmail.com",
    "nombre": "John",
    "pasword": "$2a$10$Y0JVw2XWggefrziIN0BsSeBmHyQ.9omUvBTxINwPUJEPQOXsdNAs2",
    "telefono": "963258741",
    "activo": 1,
    "rol": {
      "idrol": 1,
      "descripcion": "administrador",
      "activo": 1
    }
  }
] - tengo este error - usuario.service.ts:17 Ocurrió un error: HttpErrorResponse {headers: _HttpHeaders, status: 200, statusText: 'OK', url: 'http://localhost:8095/login', ok: false, …}
handleError @ usuario.service.ts:17
(anonymous) @ catchError.js:10
OperatorSubscriber2._this._error @ OperatorSubscriber.js:25
Subscriber2.error @ Subscriber.js:43
Subscriber2._error @ Subscriber.js:67
Subscriber2.error @ Subscriber.js:43
Subscriber2._error @ Subscriber.js:67
Subscriber2.error @ Subscriber.js:43
Subscriber2._error @ Subscriber.js:67
Subscriber2.error @ Subscriber.js:43
Subscriber2._error @ Subscriber.js:67
Subscriber2.error @ Subscriber.js:43
onLoad @ http.mjs:2289
invokeTask @ zone.js:398
(anonymous) @ core.mjs:14556
onInvokeTask @ core.mjs:14556
invokeTask @ zone.js:397
onInvokeTask @ core.mjs:14869
invokeTask @ zone.js:397
runTask @ zone.js:158
invokeTask @ zone.js:479
invokeTask @ zone.js:1109
globalCallback @ zone.js:1152
globalZoneAwareCallback @ zone.js:1173
Zone - XMLHttpRequest.addEventListener:load (async)
onScheduleTask @ core.mjs:14550
scheduleTask @ zone.js:378
onScheduleTask @ zone.js:267
scheduleTask @ zone.js:378
scheduleTask @ zone.js:201
scheduleEventTask @ zone.js:227
(anonymous) @ zone.js:1470
(anonymous) @ http.mjs:2364
Observable2._trySubscribe @ Observable.js:38
(anonymous) @ Observable.js:32
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ switchMap.js:14
OperatorSubscriber2._this._next @ OperatorSubscriber.js:15
Subscriber2.next @ Subscriber.js:34
(anonymous) @ innerFrom.js:51
Observable2._trySubscribe @ Observable.js:38
(anonymous) @ Observable.js:32
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ switchMap.js:10
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ finalize.js:5
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ finalize.js:5
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
doInnerSub @ mergeInternals.js:19
outerNext @ mergeInternals.js:14
OperatorSubscriber2._this._next @ OperatorSubscriber.js:15
Subscriber2.next @ Subscriber.js:34
(anonymous) @ innerFrom.js:51
Observable2._trySubscribe @ Observable.js:38
(anonymous) @ Observable.js:32
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
mergeInternals @ mergeInternals.js:53
(anonymous) @ mergeMap.js:14
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ filter.js:6
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ map.js:6
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
(anonymous) @ catchError.js:9
(anonymous) @ lift.js:10
(anonymous) @ Observable.js:27
errorContext @ errorContext.js:19
Observable2.subscribe @ Observable.js:23
listarUsuarios @ usuario-listar.component.ts:21
ngOnInit @ usuario-listar.component.ts:17
callHookInternal @ core.mjs:5136
callHook @ core.mjs:5163
callHooks @ core.mjs:5118
executeInitAndCheckHooks @ core.mjs:5068
refreshView @ core.mjs:12806
detectChangesInView$1 @ core.mjs:13015
detectChangesInViewIfAttached @ core.mjs:12978
detectChangesInEmbeddedViews @ core.mjs:12935
refreshView @ core.mjs:12815
detectChangesInView$1 @ core.mjs:13015
detectChangesInViewIfAttached @ core.mjs:12978
detectChangesInComponent @ core.mjs:12967
detectChangesInChildComponents @ core.mjs:13028
refreshView @ core.mjs:12841
detectChangesInView$1 @ core.mjs:13015
detectChangesInViewWhileDirty @ core.mjs:12732
detectChangesInternal @ core.mjs:12714
detectChangesInView @ core.mjs:31734
detectChangesInViewIfRequired @ core.mjs:31707
detectChangesInAttachedViews @ core.mjs:31562
_tick @ core.mjs:31532
tick @ core.mjs:31521
(anonymous) @ core.mjs:31902
invoke @ zone.js:365
onInvoke @ core.mjs:14882
invoke @ zone.js:364
run @ zone.js:111
run @ core.mjs:14733
next @ core.mjs:31901
ConsumerObserver2.next @ Subscriber.js:96
Subscriber2._next @ Subscriber.js:63
Subscriber2.next @ Subscriber.js:34
(anonymous) @ Subject.js:41
errorContext @ errorContext.js:19
Subject2.next @ Subject.js:31
emit @ core.mjs:6845
checkStable @ core.mjs:14801
onHasTask @ core.mjs:14899
hasTask @ zone.js:418
_updateTaskCount @ zone.js:439
_updateTaskCount @ zone.js:260
runTask @ zone.js:175
drainMicroTaskQueue @ zone.js:577
Promise.then (async)
nativeScheduleMicroTask @ zone.js:553
scheduleMicroTask @ zone.js:564
scheduleTask @ zone.js:387
scheduleTask @ zone.js:201
scheduleMicroTask @ zone.js:221
scheduleResolveOrReject @ zone.js:2488
then @ zone.js:2693
bootstrapModule @ core.mjs:32307
(anonymous) @ main.ts:6
Show 139 more frames
Show less
usuario-listar.component.ts:26 Error al listar usuarios Error: Error: 
    at usuario.service.ts:18:29
    at Observable2.init [as _subscribe] (throwError.js:5:64)
    at Observable2._trySubscribe (Observable.js:38:25)
    at Observable.js:32:31
    at errorContext (errorContext.js:19:9)
    at Observable2.subscribe (Observable.js:23:9)
    at catchError.js:14:31
    at OperatorSubscriber2._this._error (OperatorSubscriber.js:25:21)
    at Subscriber2.error (Subscriber.js:43:18)
    at Subscriber2._error (Subscriber.js:67:30) en angular - import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { Usuario } from '../../models/usuario.model';

@Injectable({
  providedIn: 'root'
})
export class UsuarioService {

  private apiUrl = 'http://localhost:8095/usuario';

  constructor(private http: HttpClient) {}

  private handleError(error: HttpErrorResponse) {
    console.error('Ocurrió un error:', error);
    return throwError(() => new Error('Error: '));
  }


  login(username: string, password: string): Observable<any> {
    const loginData = new URLSearchParams();
    loginData.set('username', username);
    loginData.set('password', password);
  
    const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' });  // Corrected content type
  
    return this.http.post<any>(`${this.apiUrl}/login`, loginData.toString(), { headers })
      .pipe(
        catchError(this.handleError)
      );
  }
  
  
  logout(): Observable<any> {
    return this.http.post(`${this.apiUrl}/logout`, {}).pipe(
      catchError(this.handleError)
    );
  }


  listarUsuarios(): Observable<Usuario[]> {
    return this.http.get<Usuario[]>(this.apiUrl).pipe(
      catchError(this.handleError)
    );
  } - @Component({
  selector: 'app-usuario-listar',
  templateUrl: './usuario-listar.component.html',
  styleUrl: './usuario-listar.component.css'
})
export class UsuarioListarComponent implements OnInit {

  usuarios: Usuario[] = [];

     constructor(private usuarioService: UsuarioService) { }

     ngOnInit(): void {
       this.listarUsuarios();
     }

     listarUsuarios(): void {
      this.usuarioService.listarUsuarios().subscribe({
        next: (data: Usuario[]) => {
          this.usuarios = data;
        },
        error: (error) => {
          console.error('Error al listar usuarios', error);
        }
      });
    }
 - no uses simbolo de dolar, ovialos,eso hace que tengas error , mejor usa SDOLAR en vez de eso