代码更新

This commit is contained in:
ldj_willow
2022-10-09 14:25:11 +08:00
parent 324fa05a39
commit 55e46a0674
2 changed files with 21 additions and 17 deletions

View 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初始化成功!");
}
}

View File

@@ -2,10 +2,8 @@ package org.nl.start;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.wql.WQLCore;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
/**
@@ -14,23 +12,10 @@ import org.springframework.stereotype.Component;
@Slf4j
@Component
@RequiredArgsConstructor
@Order(0)
public class Init implements ApplicationRunner {
private void init() throws Exception {
//初始化WQL
initWql();
@Override
public void run(ApplicationArguments args) throws Exception {
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();
}
}