'file from one node to another node?

I would like to add a database to it so that the information is stored.



Solution 1:[1]

You need to map Dto objects with Entities. Use Mapstruct for the purpose. Next configure any Data base in your project and make connection to it. For ease it could be H2 data base. It's better to write set of CRUD REST controllers that will get all needed information from a site accordingly it's api specification and save it to DB. Then in main Spring Boot application class you code some logic applying to the REST controllers.

Solution 2:[2]

You can use the ModelMapper class to convert Dto to Model and vice versa. ModelMapper class has map() which maps Model to Dto and vice versa. Once you convert the Dto to Model you can call currencyRepository.save() to save the Model to the database.

You can refer this link.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrey
Solution 2 rg226965