1 parent
52ba462e42
commit
a810fb2e98
1 file changed
+6
@@ -8,6 +8,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Getter
|
@Getter
|
||||||
@Component
|
@Component
|
||||||
@@ -25,6 +28,9 @@ public class WeComSdkClient {
|
|||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
System.setProperty("java.library.path", libPath);
|
System.setProperty("java.library.path", libPath);
|
||||||
|
for (File file : Objects.requireNonNull(new File(libPath).listFiles())) {
|
||||||
|
System.load(file.getAbsolutePath());
|
||||||
|
}
|
||||||
sdk = Finance.NewSdk();
|
sdk = Finance.NewSdk();
|
||||||
int ret = Finance.Init(sdk, corpId, secret);
|
int ret = Finance.Init(sdk, corpId, secret);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user