gpki 초기화 수정

master
mjkhan21 1 year ago
parent 6a7291b391
commit 6e9f9a32fa

@ -37,10 +37,6 @@ public class GPKI extends AbstractComponent {
private gpkiapi_jni gpki; private gpkiapi_jni gpki;
static {
init();
}
/** . /** .
* @param serverID * @param serverID
* @param data * @param data
@ -91,6 +87,8 @@ public class GPKI extends AbstractComponent {
} }
private static void init() { private static void init() {
if (!serverCerts.isEmpty()) return;
try { try {
GpkiApi.init(conf.license); GpkiApi.init(conf.license);
gpkiapi_jni gpki = getGpki(); gpkiapi_jni gpki = getGpki();
@ -230,6 +228,7 @@ public class GPKI extends AbstractComponent {
if (gpki != null) return false; if (gpki != null) return false;
try { try {
init();
gpki = getGpki(); gpki = getGpki();
return true; return true;
} catch (Exception e) { } catch (Exception e) {

@ -12,6 +12,8 @@ import cokr.xit.interfaces.disabledparking.service.bean.DisabledParkingBean;
import cokr.xit.interfaces.disabledparking.service.bean.GPKI; import cokr.xit.interfaces.disabledparking.service.bean.GPKI;
public class DisabledParkingServiceTest extends TestSupport { public class DisabledParkingServiceTest extends TestSupport {
@Resource(name = "disabledParkingBean")
private DisabledParkingBean bean;
@Resource(name = "disabledParkingService") @Resource(name = "disabledParkingService")
private DisabledParkingService service; private DisabledParkingService service;
@ -50,7 +52,7 @@ public class DisabledParkingServiceTest extends TestSupport {
"56저2472", "Y" "56저2472", "Y"
) )
.forEach((k, v) -> { .forEach((k, v) -> {
Map<String, Object> result = service.getParkingInfo(k); Map<String, Object> result = bean.getParkingInfo(k);
Assertions.assertEquals(v, result.get("PARKING_PSBL_YN")); Assertions.assertEquals(v, result.get("PARKING_PSBL_YN"));
}); });
} }

Loading…
Cancel
Save