| | |
| | | package com.boying; |
| | | |
| | | |
| | | import cn.hutool.core.io.resource.ClassPathResource; |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |