How communicate with springboot and ionic?

Hello developpers, i am using ionic 4 with spring boot web service , the problem is after installation application in my phone the web service is not run ?

i use in

@CrossOrigin(origins = "*")
public class CarController {
    CarRepository carRepository;
    @GetMapping(path = "/cars")
    public ResponseEntity<List<Car>> retriveCars() {
        try {
            List<Car> cars = new ArrayList<>();
            if (cars.isEmpty()) {
                return new ResponseEntity<>(null, HttpStatus.NO_CONTENT);
            return new ResponseEntity<>(cars, HttpStatus.OK);
        }catch(Exception e) {
            return new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);
    @PostMapping(path = "/car")
    public ResponseEntity<Car> saveCar (@RequestBody Car car) {
        try {
            Car _car= Car(UUID.randomUUID(), car.getMake(), car.getModel()));
            return new ResponseEntity<>(_car, HttpStatus.CREATED);
        catch(Exception e) {
            return new ResponseEntity<>(null, HttpStatus.EXPECTATION_FAILED);

and in api.service.ts

 import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Car } from './car';

  providedIn: 'root'
export class ApiService {
  constructor(private http: HttpClient) { }


    return this.http.get<Car[]>(this.baseUrl+ '/cars');

  saveCar(car: Car) {
    return<Car>(this.baseUrl+'/car', car);

My question is how can i communicate in ionic and springboot? i need help please

This is probably a stupid question, but is the “springboot” thing also supposed to be running on the phone?