I have data from two sources 1.From database 2.External server using REST
I have written JPA repository for data database
public interface DeviceRepository extends JpaRepository<Devices, Long> {
List<Devices> findByActivation(boolean active);
List<Devices> findByDeviceId(int id);
}
Second kind of data I need to get from REST
List<UserDevices> userDevices = // send http request to get this data
List<Devices> devices= tutorialRepository.findByActivation(true)
for(usermap : userDevices)
{
// iterate over and join these two
}
due to some restriction we can not source the REST data to samedb, Is there any better option to join these information ?