代码更新
This commit is contained in:
19
nladmin-system/src/main/java/org/nl/modules/wql/WQLInit.java
Normal file
19
nladmin-system/src/main/java/org/nl/modules/wql/WQLInit.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package org.nl.modules.wql;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.ApplicationArguments;
|
||||||
|
import org.springframework.boot.ApplicationRunner;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Order(0)
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class WQLInit implements ApplicationRunner {
|
||||||
|
@Override
|
||||||
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
|
WQLCore.ROOT = "org.nl";
|
||||||
|
WQLCore.init();
|
||||||
|
log.info("WQL初始化成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,10 +2,8 @@ package org.nl.start;
|
|||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.wql.WQLCore;
|
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.boot.ApplicationRunner;
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,23 +12,10 @@ import org.springframework.stereotype.Component;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Order(0)
|
|
||||||
public class Init implements ApplicationRunner {
|
public class Init implements ApplicationRunner {
|
||||||
|
@Override
|
||||||
private void init() throws Exception {
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
//初始化WQL
|
|
||||||
initWql();
|
|
||||||
System.out.println("项目启动成功!");
|
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user