@Component
@ConditionalOnExpression(value="${xforce.taxpayer.sync.enabled:false}")
public class TaxPayerSyncService
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
从税件同步纳税人性质 对接文档:https://wiki.xforceplus.com/pages/viewpage.action?pageId=123339756 用单线程拉数据,然后异步处理获取的数据
| 构造器和说明 |
|---|
TaxPayerSyncService() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc. |
void |
destroy()
Invoked by the containing
BeanFactory on destruction of a bean. |
boolean |
handleMessage(com.xforceplus.janus.message.sdk.ResponseMessage message)
处理拉取的消息
|
void |
initPubsubConf() |
void |
pullTaxPayerMessage() |
@Scheduled(fixedRate=60000L) public void pullTaxPayerMessage()
public void destroy()
throws java.lang.Exception
BeanFactory on destruction of a bean.destroy 在接口中 org.springframework.beans.factory.DisposableBeanjava.lang.Exception - in case of shutdown errors. Exceptions will get logged
but not rethrown to allow other beans to release their resources as well.public void afterPropertiesSet()
throws java.lang.Exception
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanjava.lang.Exception - in the event of misconfiguration (such as failure to set an
essential property) or if initialization fails for any other reason@PostConstruct public void initPubsubConf()
public boolean handleMessage(com.xforceplus.janus.message.sdk.ResponseMessage message)
message - 消息体