This commit is contained in:
2026-08-25 12:30:07 +08:00
parent 12dad6673d
commit 1382902f86
16 changed files with 687 additions and 19 deletions
@@ -1,5 +1,7 @@
package com.baiyue.lastleg.palletops.gateway;
import com.baiyue.lastleg.config.LastlegRestClientFactory;
import com.baiyue.lastleg.config.LastlegRestClientProperties;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
@@ -13,11 +15,16 @@ import java.util.Map;
@Component
public class HttpPalletPhysicalGateway implements PalletPhysicalGateway {
@Resource private RestClient.Builder restClientBuilder;
@Resource private LastlegRestClientFactory restClientFactory;
@Resource private LastlegRestClientProperties restClientProperties;
@Value("${baiyue.warehouse.base-url:http://127.0.0.1:9305}") private String baseUrl;
@Value("${baiyue.security.internal-service-token:}") private String internalToken;
private RestClient client;
@PostConstruct void initialize() { client = restClientBuilder.baseUrl(baseUrl).build(); }
@PostConstruct void initialize() {
client = restClientFactory.build(restClientBuilder, baseUrl,
restClientProperties.getPalletPhysical());
}
@Override
public PalletReference resolve(String palletCode) {