用户密码正则表达式bug

This commit is contained in:
2023-08-21 14:06:56 +08:00
parent ca3ec2d82f
commit 5c1eaec013
2 changed files with 57 additions and 58 deletions

View File

@@ -31,17 +31,20 @@ public class JnaCallDllOrSo {
//linux操作系统
this.nameDll = "lib" + name + "_dll";
suffix = ".so";
// this.path = "/usr/local/jarfiles/advanceboot/BOOT-INF/classes/";
//this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8");
} else {
this.nameDll = name;
// this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath().replaceFirst("/", ""), "UTF-8");
}
File tempFile;
File dockerFile = new File("/usr/local/dllFile/".concat(this.nameDll.concat(suffix)));
if(dockerFile.exists()){
this.path = dockerFile.getAbsolutePath();
}else {
dockerFile.mkdirs();
dockerFile.createNewFile();
}
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(this.nameDll.concat(suffix))) {
tempFile = File.createTempFile(this.nameDll, suffix);
try (FileOutputStream outputStream = new FileOutputStream(tempFile)) {
try (FileOutputStream outputStream = new FileOutputStream(dockerFile)) {
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
@@ -49,9 +52,7 @@ public class JnaCallDllOrSo {
}
}
}
this.path = tempFile.getAbsolutePath();
System.out.println(1);
System.out.println(1);
this.path = dockerFile.getAbsolutePath();
} catch (Exception e) {
log.error(e.getMessage());
}
@@ -62,8 +63,6 @@ public class JnaCallDllOrSo {
public String getStrpath() {
return this.path;
// String aa = this.path + this.nameDll;
// return aa.replace("/", File.separator);
}
public void setPath() {

View File

@@ -1,47 +1,47 @@
package com.njcn.influx;
import com.njcn.influx.imapper.CldStatisticsFlowMapper;
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
import com.njcn.influx.pojo.po.DataV;
import com.njcn.influx.service.CommonService;
import com.njcn.influx.service.DataFlickerService;
import com.njcn.influx.service.IDataVService;
import lombok.SneakyThrows;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2021年12月14日 12:55
*/
public class DemoTest extends BaseJunitTest {
@Autowired
private CldStatisticsFlowMapper cldStatisticsFlowMapper;
@Autowired
private DataFlickerService dataFlickerService;
@Autowired
private IDataVService dataVService;
@Autowired
private CommonService commonService;
@SneakyThrows
@Test
public void test() {
// dataFlickerService.getDataFlicker("ff2d9674c1f1ecce7f33a5bf17fc4f2d","2023-05-02 00:00:00","2023-05-02 23:59:59");
// List<DataV> ss = dataVService.getDataV("ff2d9674c1f1ecce7f33a5bf17fc4f2d", "2023-05-02 00:00:00", "2023-05-02 23:59:59");
// System.out.println(ss);
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData("4","data_harmpower_p","W","A","max");
System.out.println("statisticalDataDTO==:" + statisticalDataDTO);
}
}
//package com.njcn.influx;
//
//import com.njcn.influx.imapper.CldStatisticsFlowMapper;
//import com.njcn.influx.pojo.dto.StatisticalDataDTO;
//import com.njcn.influx.pojo.po.DataV;
//import com.njcn.influx.service.CommonService;
//import com.njcn.influx.service.DataFlickerService;
//import com.njcn.influx.service.IDataVService;
//import lombok.SneakyThrows;
//import org.junit.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import java.util.List;
//
///**
// * @author hongawen
// * @version 1.0.0
// * @date 2021年12月14日 12:55
// */
//public class DemoTest extends BaseJunitTest {
//
// @Autowired
// private CldStatisticsFlowMapper cldStatisticsFlowMapper;
//
// @Autowired
// private DataFlickerService dataFlickerService;
//
// @Autowired
// private IDataVService dataVService;
//
// @Autowired
// private CommonService commonService;
//
// @SneakyThrows
// @Test
// public void test() {
//// dataFlickerService.getDataFlicker("ff2d9674c1f1ecce7f33a5bf17fc4f2d","2023-05-02 00:00:00","2023-05-02 23:59:59");
//// List<DataV> ss = dataVService.getDataV("ff2d9674c1f1ecce7f33a5bf17fc4f2d", "2023-05-02 00:00:00", "2023-05-02 23:59:59");
//// System.out.println(ss);
//
// StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData("4","data_harmpower_p","W","A","max");
// System.out.println("statisticalDataDTO==:" + statisticalDataDTO);
//
//
// }
//
//}