In memory compiler 로 변경, 기동시 스크립트 로딩 추가

This commit is contained in:
yunjy
2022-08-19 14:17:06 +09:00
parent 83568bd9d5
commit 9ce8bd619f
6 changed files with 58 additions and 31 deletions
@@ -0,0 +1,28 @@
package com.eactive.httpmockserver;
import com.eactive.httpmockserver.script.ScriptInfoService;
import com.eactive.httpmockserver.script.ScriptLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
public class PostConstructBean {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
public ScriptInfoService scriptInfoService;
@PostConstruct
public void init() {
logger.info("init scripts");
try {
ScriptLoader.getInstance().init(scriptInfoService);
} catch (Exception e) {
logger.error("init scripts failed", e);
}
}
}