Files
longdianningxing/nladmin-system/src/main/java/org/nl/start/Init.java

37 lines
875 B
Java
Raw Normal View History

2022-07-06 18:32:05 +08:00
package org.nl.start;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
2022-09-26 09:16:28 +08:00
import org.nl.modules.wql.WQLCore;
2022-07-06 18:32:05 +08:00
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
2022-10-09 14:09:34 +08:00
import org.springframework.core.annotation.Order;
2022-07-06 18:32:05 +08:00
import org.springframework.stereotype.Component;
/**
* 随项目启动模块
*/
@Slf4j
@Component
@RequiredArgsConstructor
2022-10-09 14:09:34 +08:00
@Order(0)
2022-09-24 09:42:05 +08:00
public class Init implements ApplicationRunner {
2022-07-06 18:32:05 +08:00
private void init() throws Exception {
//初始化WQL
initWql();
System.out.println("项目启动成功!");
}
private void initWql() throws Exception {
WQLCore.ROOT = "org.nl";
WQLCore.init();
log.info("WQL初始化成功!");
}
@Override
public void run(ApplicationArguments args) throws Exception {
this.init();
}
}