@@ -1,5 +1,7 @@ | |||
package com.telpo.dipperposition.service; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import java.io.UnsupportedEncodingException; | |||
/** | |||
@@ -14,6 +16,8 @@ import java.io.UnsupportedEncodingException; | |||
*/ | |||
public interface IDipperAstPosAsyncTaskService { | |||
@Autowired | |||
void setDipperAstPosAsyncTaskService(IDipperAstPosAsyncTaskService dipperAstPosAsyncTaskService); | |||
/** | |||
* 同步任务 | |||
* | |||
@@ -1,5 +1,8 @@ | |||
package com.telpo.dipperposition.service; | |||
import com.telpo.dipperposition.service.impl.DipperDataAsyncTaskServiceImpl; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
/** | |||
* @program: IDipperDataAsyncTaskService | |||
* @description: 发送SDBP-AST-TIME获取时间信息 | |||
@@ -8,6 +11,8 @@ package com.telpo.dipperposition.service; | |||
*/ | |||
public interface IDipperAstTimeAsyncTaskService { | |||
@Autowired | |||
void setDipperAstTimeAsyncTaskService(IDipperAstTimeAsyncTaskService dipperAstTimeAsyncTaskService); | |||
/** | |||
* 同步任务 | |||
* | |||
@@ -1,5 +1,6 @@ | |||
package com.telpo.dipperposition.service; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.beans.factory.annotation.Value; | |||
/** | |||
@@ -12,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value; | |||
*/ | |||
public interface IDipperDataAsyncTaskService { | |||
@Autowired | |||
void setDipperDataAsyncTaskService(IDipperDataAsyncTaskService IDipperDataAsyncTaskService); | |||
/** | |||
* 同步任务 | |||
* | |||
@@ -2,6 +2,7 @@ package com.telpo.dipperposition.service; | |||
import com.telpo.dipperposition.entity.mongo.IPProvinceEntity; | |||
import com.telpo.dipperposition.vo.IPProvinceVo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
/** | |||
* @program: IPProvinceService | |||
@@ -11,6 +12,8 @@ import com.telpo.dipperposition.vo.IPProvinceVo; | |||
*/ | |||
public interface IpProvinceService { | |||
@Autowired | |||
void setIPProvinceService(IpProvinceService ipProvinceService); | |||
/** | |||
* 保存IP省份 | |||
* | |||
@@ -35,13 +35,13 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS | |||
@Autowired | |||
private IpProvinceService ipProvinceService; | |||
private static DipperAstPosAsyncTaskServiceImpl dipperAstPosAsyncTaskService; | |||
private static IDipperAstPosAsyncTaskService dipperAstPosAsyncTaskService; | |||
/** | |||
* spring会自动从ioc容器当中根据IDipperAstPosAsyncTaskService类型找到dipperAstPosAsyncTaskService,当做参数传进来 | |||
* | |||
*/ | |||
@Autowired | |||
public void setDipperAstPosAsyncTaskService(DipperAstPosAsyncTaskServiceImpl dipperAstPosAsyncTaskService) { | |||
@Override | |||
public void setDipperAstPosAsyncTaskService(IDipperAstPosAsyncTaskService dipperAstPosAsyncTaskService) { | |||
this.dipperAstPosAsyncTaskService = dipperAstPosAsyncTaskService; | |||
} | |||
@@ -22,14 +22,13 @@ import java.time.LocalDateTime; | |||
@Slf4j | |||
public class DipperAstTimeAsyncTaskServiceImpl implements IDipperAstTimeAsyncTaskService { | |||
private static DipperAstTimeAsyncTaskServiceImpl dipperAstTimeAsyncTaskService; | |||
private static IDipperAstTimeAsyncTaskService dipperAstTimeAsyncTaskService; | |||
/** | |||
* spring会自动从ioc容器当中根据IDipperAstPosAsyncTaskService类型找到dipperAstTimeAsyncTaskService,当做参数传进来 | |||
* spring会自动从ioc容器当中根据IDipperAstTimeAsyncTaskService类型找到dipperAstTimeAsyncTaskService,当做参数传进来 | |||
* | |||
*/ | |||
@Autowired | |||
public void setDipperAstTimeAsyncTaskService(DipperAstTimeAsyncTaskServiceImpl dipperAstTimeAsyncTaskService) { | |||
@Override | |||
public void setDipperAstTimeAsyncTaskService(IDipperAstTimeAsyncTaskService dipperAstTimeAsyncTaskService) { | |||
this.dipperAstTimeAsyncTaskService = dipperAstTimeAsyncTaskService; | |||
} | |||
@@ -4,6 +4,7 @@ import com.telpo.dipperposition.common.HexConvert; | |||
import com.telpo.dipperposition.common.RedisUtil; | |||
import com.telpo.dipperposition.common.SocketClient; | |||
import com.telpo.dipperposition.config.SchedulingExecutorConfig; | |||
import com.telpo.dipperposition.service.IDipperAstTimeAsyncTaskService; | |||
import com.telpo.dipperposition.service.IDipperDataAsyncTaskService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -30,13 +31,13 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi | |||
private SchedulingExecutorConfig schedulingExecutorConfig; | |||
private static DipperDataAsyncTaskServiceImpl dipperDataAsyncTaskService; | |||
private static IDipperDataAsyncTaskService dipperDataAsyncTaskService; | |||
/** | |||
* spring会自动从ioc容器当中根据IDipperDataAsyncTaskService类型找到dipperDataAsyncTaskService,当做参数传进来 | |||
* spring会自动从ioc容器当中根据IDipperAstTimeAsyncTaskService类型找到dipperDataAsyncTaskService,当做参数传进来 | |||
* | |||
*/ | |||
@Autowired | |||
public void setDipperDataAsyncTaskService(DipperDataAsyncTaskServiceImpl dipperDataAsyncTaskService) { | |||
@Override | |||
public void setDipperDataAsyncTaskService(IDipperDataAsyncTaskService dipperDataAsyncTaskService) { | |||
this.dipperDataAsyncTaskService = dipperDataAsyncTaskService; | |||
} | |||
@@ -28,7 +28,7 @@ public class IpProvinceServiceImpl implements IpProvinceService { | |||
* spring会自动从ioc容器当中根据IPProvinceService类型找到ipProvinceService,当做参数传进来 | |||
* | |||
*/ | |||
@Autowired | |||
@Override | |||
public void setIPProvinceService(IpProvinceService ipProvinceService) { | |||
this.ipProvinceService = ipProvinceService; | |||
} | |||