⚡ 为配置类添加@RefreshScope支持Nacos配置动态刷新
This commit is contained in:
+2
@@ -28,6 +28,7 @@ package org.springblade.transport.config;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springblade.thirdparty.bfi.constant.BfiConstant;
|
import org.springblade.thirdparty.bfi.constant.BfiConstant;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,6 +43,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Component
|
@Component
|
||||||
|
@RefreshScope
|
||||||
@ConfigurationProperties(prefix = "thirdparty.bfi")
|
@ConfigurationProperties(prefix = "thirdparty.bfi")
|
||||||
public class BfiProperties {
|
public class BfiProperties {
|
||||||
|
|
||||||
|
|||||||
+2
@@ -78,6 +78,7 @@ import org.springblade.transport.support.KingdeeApBillSyncSupport;
|
|||||||
import org.springblade.transport.support.KingdeeReceivedInvoiceSyncSupport;
|
import org.springblade.transport.support.KingdeeReceivedInvoiceSyncSupport;
|
||||||
import org.springblade.transport.wrapper.InvoiceReceiptWrapper;
|
import org.springblade.transport.wrapper.InvoiceReceiptWrapper;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -104,6 +105,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
|
@RefreshScope
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class InvoiceReceiptServiceImpl extends BaseServiceImpl<InvoiceReceiptMapper, InvoiceReceipt>
|
public class InvoiceReceiptServiceImpl extends BaseServiceImpl<InvoiceReceiptMapper, InvoiceReceipt>
|
||||||
implements IInvoiceReceiptService {
|
implements IInvoiceReceiptService {
|
||||||
|
|||||||
+2
@@ -29,6 +29,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springblade.transport.service.ICustomerArchiveService;
|
import org.springblade.transport.service.ICustomerArchiveService;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@RefreshScope
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class CustomerKingdeeSyncTask {
|
public class CustomerKingdeeSyncTask {
|
||||||
|
|
||||||
|
|||||||
+2
@@ -48,6 +48,7 @@ import org.springblade.transport.support.hcs.HcsPaymentSyncSupport;
|
|||||||
import org.springblade.transport.support.hcs.HcsProjectSyncSupport;
|
import org.springblade.transport.support.hcs.HcsProjectSyncSupport;
|
||||||
import org.springblade.transport.support.hcs.HcsReceiptBillSyncSupport;
|
import org.springblade.transport.support.hcs.HcsReceiptBillSyncSupport;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -81,6 +82,7 @@ import java.util.function.Supplier;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@RefreshScope
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class HcsPushTask {
|
public class HcsPushTask {
|
||||||
|
|
||||||
|
|||||||
+2
@@ -26,6 +26,7 @@ import org.springblade.transport.service.IInvoiceApplicationService;
|
|||||||
import org.springblade.transport.service.IInvoiceReceiptService;
|
import org.springblade.transport.service.IInvoiceReceiptService;
|
||||||
import org.springblade.transport.service.IPaymentApplicationService;
|
import org.springblade.transport.service.IPaymentApplicationService;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@RefreshScope
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class PaymentKingdeeResultTask {
|
public class PaymentKingdeeResultTask {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user