提交 fe92153b authored 作者: zhoushaopan's avatar zhoushaopan

feat(盘存模块): 释放读写机资源

释放读写机资源
上级 6e933109
......@@ -70,8 +70,8 @@ public class ReadMachineBillController {
@Autowired
private TaskService taskService;
@Autowired
private ReadUtils readUtils;
// @Autowired
// private ReadUtils readUtils;
static{
//增加一个全局变量,只要加载过这个so就不再执行,除非进程重启才会清掉该变量。
......@@ -158,7 +158,7 @@ public class ReadMachineBillController {
* 读取装备信息
*/
public List<DeviceLibrary> startDeviceDetail(){
// ReadUtils readUtils = new ReadUtils();
ReadUtils readUtils = new ReadUtils();
//先开启
readUtils.testinitreader();
while (localFlag){
......
......@@ -12,7 +12,7 @@ import java.util.List;
@Data
@Slf4j
@Component
//@Component
public class ReadUtils {
/**
......@@ -25,9 +25,9 @@ public class ReadUtils {
//公司测试读写机实验室ip
// String ReaderAddr="192.168.0.201";
//公司正式读写机实验室ip
// String ReaderAddr="192.168.0.100";
@Value("${readMachine.ip}")
public String ReaderAddr;
String ReaderAddr="192.168.0.100";
// @Value("${readMachine.ip}")
// public String ReaderAddr;
Reader Jreader;
public ReadUtils()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论