Project created using JAVA language / Spring Framework to manage a database (MySQL) of clients and addresses, consuming an opensource API Rest (ViaCEP) for the addresses based on the address code and using OpenAPI as UI for the application.
- clone this Repo into your machine;
- modify the application.properties file for your database configuration;
- run the Application main class;
- Open your browser;
- Enter the URL: "http://localhost:8080/swagger-ui/index.html"
- Spring Web;
- Spring Data JPA;
- MySQL Driver;
- OpenFeign;
- Open API.
Model folder contains the Client (Cliente) and Address (Endereco) classes and also the repositories extending CrudRepository for each one:
- Cliente (Client);
- Endereco (Address);
- ClienteRepository;
- EnderecoRepository.
Service folder contains the interface for the ClienteService, the interface for the ViaCepService (API Rest for the addresses information) and the implementation of these interfaces for communicating with the API and gathering this information for the application:
- ClienteService (Client Service);
- EnderecoService (Address Service);
- ClientServiceImpl (Implementation).
Controller folder contains the ClientRestController which is responsible for defining the methods and actions performed by the application into the DataBase, translating the created methods into pre-set CrudRepository methods:
- ClientRestController.