增加判断是否初始化sql

master
wj 2 years ago
parent e8dedfb195
commit 3cfc2887d4

@ -7,6 +7,7 @@ import com.glxp.api.dao.system.DbVersionDao;
import com.glxp.api.entity.system.DbVersionEntity;
import com.glxp.api.entity.system.SchemaData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
@ -26,10 +27,16 @@ public class HdSchemaExecutor implements ApplicationRunner {
@Resource
DbVersionDao hdCommonDao;
@Value("${initSql:true}")
private boolean initSql;
private List<SchemaData> schema = new ArrayList<>();
@Override
public void run(ApplicationArguments args) throws Exception {
if (!initSql) {
return;
}
//初始版本列表
buildSchemas();
//定义sql文件路径

Loading…
Cancel
Save