|
|
|
@ -2,6 +2,7 @@ package me.bearns.fias.service; |
|
|
|
|
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import me.bearns.fias.domain.FiasVersion; |
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
@ -9,13 +10,14 @@ import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
@AllArgsConstructor |
|
|
|
|
//@AllArgsConstructor
|
|
|
|
|
@Component |
|
|
|
|
public class OnlineVersionImpl implements OnlineVersion{ |
|
|
|
|
|
|
|
|
|
private static final String GET_ALL_FILE_INFO = "http://fias.nalog.ru/WebServices/Public/GetAllDownloadFileInfo"; |
|
|
|
|
private static final String GET_LAST_FILE_INFO = "http://fias.nalog.ru/WebServices/Public/GetLastDownloadFileInfo"; |
|
|
|
|
private static final String GET_ALL_FILE_INFO = "https://fias.nalog.ru/WebServices/Public/GetAllDownloadFileInfo"; |
|
|
|
|
private static final String GET_LAST_FILE_INFO = "https://fias.nalog.ru/WebServices/Public/GetLastDownloadFileInfo"; |
|
|
|
|
|
|
|
|
|
RestTemplate client; |
|
|
|
|
RestTemplate client = new RestTemplate(); |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public long getLastVersionId() { |
|
|
|
|