Skip to content

plopezgit/Sprint5_T1_SpringBoot_APIs_Connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sprint5_T1_SpringBoot_APIs_Connection (Rest Template)

Using RestTemplate or WebClient, you will need to connect to the API you made in level 2, to call and test all the requests that this API allows.

Note, that in this level 3 task, you have no reference to any database, nor do you need to use JPA, as your repository will access the level 2 API.

You don't need to create a View, because this level 3 is planned as a Rest API, but you will need to create all the layers up to the controller like any other application:

  • cat.itacademy.barcelonactiva.cognoms.nom.s05.t01.n03.controllers
  • cat.itacademy.barcelonactiva.surnames.nom.s05.t01.n03.model.domain
  • cat.itacademy.barcelonactiva.surnames.name.s05.t01.n03.model.dto
  • cat.itacademy.barcelonactiva.surnames.nom.s05.t01.n03.model.services
  • cat.itacademy.barcelonactiva.cognoms.nom.s05.t01.n03.model.repository

The controller class must be able to handle the following requests:

As you can see, in the application.properties file, you must configure that the port to use is 9002.

To test level 3, you'll need to have the level 2 API running. You won't have any problems, since the level 3 API works with port 9002 and the level 2 API with port 9001.