kongdeqiang
1 天以前 973f7a2b420dddb06553489d72d4aa6fdea3c1c0
src/main/java/com/boying/Application.java
@@ -1,11 +1,14 @@
package com.boying;
import cn.hutool.core.io.resource.ClassPathResource;
import com.boying.common.SystemConfigProperties;
import net.sf.jni4net.Bridge;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.io.File;
import java.io.IOException;
@@ -21,6 +24,7 @@
@EnableScheduling
public class Application {
    public static void main(String[] args) {
        System.out.println("项目文件夹为:"+System.getProperty("user.dir"));
        SpringApplication.run(Application.class, args);
    }
@@ -28,9 +32,7 @@
    public static void getBean() throws IOException {
        Bridge.setVerbose(true);
        Bridge.init();
        //加载资源文件
        ClassPathResource classPathResource = new ClassPathResource("jni/LedShow.j4n.dll");
        File loadDll = classPathResource.getFile();
        File loadDll = new File("LedShow.j4n.dll");
        Bridge.LoadAndRegisterAssemblyFrom(loadDll);
    }
}