修改 order 顺序

This commit is contained in:
2023-12-25 14:27:16 +08:00
parent e349b8641e
commit 83d2ee2f3a
4 changed files with 8 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ import java.net.InetSocketAddress;
@Slf4j @Slf4j
@Component @Component
@Order(value = 2) @Order(value = 5)
public class MqttSever implements CommandLineRunner { public class MqttSever implements CommandLineRunner {
@Override @Override

View File

@@ -17,7 +17,7 @@ import java.net.InetSocketAddress;
@Slf4j @Slf4j
@Component @Component
@Order(value = 1) @Order(value = 2)
public class NettyServer implements CommandLineRunner { public class NettyServer implements CommandLineRunner {
@Resource @Resource
private NettyServerChannelInitializer nettyServerChannelInitializer; private NettyServerChannelInitializer nettyServerChannelInitializer;

View File

@@ -4,8 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.huifu.adapay.Adapay; import com.huifu.adapay.Adapay;
import com.huifu.adapay.model.MerConfig; import com.huifu.adapay.model.MerConfig;
import com.jsowell.adapay.factory.AdapayConfigFactory; import com.jsowell.adapay.factory.AdapayConfigFactory;
import org.slf4j.Logger; import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
@@ -15,12 +14,11 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Order(value = 3) @Slf4j
@Order(value = 4)
@Component @Component
public class InitializeAdapayConfig implements CommandLineRunner { public class InitializeAdapayConfig implements CommandLineRunner {
private Logger logger = LoggerFactory.getLogger(InitializeAdapayConfig.class);
@Value("${adapay.debugFlag}") @Value("${adapay.debugFlag}")
private boolean DEBUG_FLAG; private boolean DEBUG_FLAG;
@@ -78,7 +76,7 @@ public class InitializeAdapayConfig implements CommandLineRunner {
merConfig.setApiMockKey(mockApiKey); merConfig.setApiMockKey(mockApiKey);
merConfig.setRSAPrivateKey(rsaPrivateKey); merConfig.setRSAPrivateKey(rsaPrivateKey);
Adapay.initWithMerConfig(merConfig); Adapay.initWithMerConfig(merConfig);
logger.info("汇付配置初始化成功debug:{}, prodMode:{}, apiKey:{}, mockApiKey:{}, rsaPrivateKey:{}" log.info("汇付配置初始化成功debug:{}, prodMode:{}, apiKey:{}, mockApiKey:{}, rsaPrivateKey:{}"
, DEBUG_FLAG, PROD_MODE, JSOWELL_API_KEY, JSOWELL_MOCK_API_KEY, JSOWELL_RSA_PRIVATE_KEY); , DEBUG_FLAG, PROD_MODE, JSOWELL_API_KEY, JSOWELL_MOCK_API_KEY, JSOWELL_RSA_PRIVATE_KEY);
} }
@@ -119,6 +117,6 @@ public class InitializeAdapayConfig implements CommandLineRunner {
// 将商户A和B的商户配置放入本地缓存 // 将商户A和B的商户配置放入本地缓存
Adapay.initWithMerConfigs(configPathMap); Adapay.initWithMerConfigs(configPathMap);
logger.info("汇付多商户配置初始化成功configPathMap:{}", JSON.toJSONString(configPathMap)); log.info("汇付多商户配置初始化成功configPathMap:{}", JSON.toJSONString(configPathMap));
} }
} }

View File

@@ -8,7 +8,7 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Order(value = 2) @Order(value = 3)
@Component @Component
public class WechatPayConfig implements CommandLineRunner { public class WechatPayConfig implements CommandLineRunner {
/** /**