diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index f29f774a..32b9df0c 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -64,8 +64,6 @@ public class CensusControllerV2 { private JdbcTemplate jdbcTemplate; @Autowired private Tsingtao_xhaProperties tsingtao_xhaProperties; - @Autowired - private TsingtaoDataResourceService tsingtaoDataResourceService; @Value("${census.type}") private String[] censusTypes; // 需要进行统计的资源类型 @@ -430,6 +428,7 @@ public class CensusControllerV2 { } break; case TSINGTAO: { // TODO 青岛大数据局 + TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService(); GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto(); getDataResourceListDto.setPageNum(1); getDataResourceListDto.setPageSize(5); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java index e0a87505..f78cdb82 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java @@ -21,14 +21,13 @@ import java.util.stream.Collectors; /** * 青岛市局数据资源 */ -@Component public class TsingtaoDataResourceService extends AbstractDataResourceService { private static final Logger logger = LoggerFactory.getLogger(TsingtaoDataResourceService.class); private static RestTemplate restTemplate; - { + static { TsingtaoDataResourceService.restTemplate = SpringContextUtils.getBean(RestTemplate.class); }