调整了依赖
This commit is contained in:
parent
ec71a0849d
commit
f5816eb60b
@ -5,6 +5,7 @@ import ink.wgink.common.manager.env.EnvManager;
|
||||
import ink.wgink.interfaces.init.IInitBaseMenu;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import ink.wgink.interfaces.init.IInitBaseUser;
|
||||
import ink.wgink.interfaces.init.IInitMongoData;
|
||||
import ink.wgink.properties.ServerProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
@ -43,28 +44,52 @@ public class CommonStartup implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
if (serverProperties.getInit() == null || serverProperties.getInit().getTable()) {
|
||||
// 建表
|
||||
Map<String, IInitBaseTable> initBaseTableMap = applicationContext.getBeansOfType(IInitBaseTable.class);
|
||||
for (Map.Entry<String, IInitBaseTable> kv : initBaseTableMap.entrySet()) {
|
||||
kv.getValue().createTable();
|
||||
}
|
||||
}
|
||||
if (serverProperties.getInit() == null || serverProperties.getInit().getMenu()) {
|
||||
// 初始化菜单
|
||||
if (initBaseMenu != null) {
|
||||
initBaseMenu.init();
|
||||
}
|
||||
}
|
||||
if (serverProperties.getInit() == null || serverProperties.getInit().getUser()) {
|
||||
// 创建用户
|
||||
if (initBaseUser != null) {
|
||||
initBaseUser.init();
|
||||
}
|
||||
}
|
||||
serverInit();
|
||||
initManager();
|
||||
initMongoData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 mongo 数据
|
||||
*/
|
||||
private void initMongoData() {
|
||||
Map<String, IInitMongoData> initMongoDataMap = applicationContext.getBeansOfType(IInitMongoData.class);
|
||||
initMongoDataMap.forEach((key, value) -> value.init());
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化管理器
|
||||
*/
|
||||
private void initManager() {
|
||||
// 初始化环境变量
|
||||
EnvManager envManager = EnvManager.getInstance();
|
||||
envManager.setEnvDao(envDao);
|
||||
envManager.refreshEnv();
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务初始化
|
||||
*/
|
||||
private void serverInit() {
|
||||
boolean isInitTable = serverProperties.getInit() == null || serverProperties.getInit().getTable();
|
||||
boolean isInitMenu = serverProperties.getInit() == null || serverProperties.getInit().getMenu();
|
||||
boolean isInitUser = serverProperties.getInit() == null || serverProperties.getInit().getUser();
|
||||
if (isInitTable) {
|
||||
// 建表
|
||||
Map<String, IInitBaseTable> initBaseTableMap = applicationContext.getBeansOfType(IInitBaseTable.class);
|
||||
initBaseTableMap.forEach((key, value) -> value.createTable());
|
||||
}
|
||||
if (isInitMenu) {
|
||||
// 初始化菜单
|
||||
if (initBaseMenu != null) {
|
||||
initBaseMenu.init();
|
||||
}
|
||||
}
|
||||
if (isInitUser) {
|
||||
// 创建用户
|
||||
if (initBaseUser != null) {
|
||||
initBaseUser.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
32
pom.xml
32
pom.xml
@ -48,14 +48,15 @@
|
||||
<module>basic-abstract</module>
|
||||
<module>module-examine</module>
|
||||
<module>mongo-login</module>
|
||||
<module>mongo-menu</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring.version>5.2.20.RELEASE</spring.version>
|
||||
<spring.version>5.3.20</spring.version>
|
||||
<spring-security.version>5.2.9.RELEASE</spring-security.version>
|
||||
<spring-boot.version>2.3.3.RELEASE</spring-boot.version>
|
||||
<spring-boot.version>2.7.0</spring-boot.version>
|
||||
<fastjson.version>1.2.25</fastjson.version>
|
||||
<fastjson2.version>2.0.2</fastjson2.version>
|
||||
<json.version>20210307</json.version>
|
||||
@ -100,11 +101,8 @@
|
||||
<activiti.version>6.0.0</activiti.version>
|
||||
<xmlgraphics.version>1.10</xmlgraphics.version>
|
||||
<minio.version>8.2.1</minio.version>
|
||||
<mongo.version>3.2.5</mongo.version>
|
||||
<mongo.version>3.4.0</mongo.version>
|
||||
<redis.version>2.5.5</redis.version>
|
||||
<freemarker.version>2.3.31</freemarker.version>
|
||||
<gson.version>2.8.5</gson.version>
|
||||
<jsoup.version>1.14.3</jsoup.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@ -206,6 +204,14 @@
|
||||
</dependency>
|
||||
<!-- json end -->
|
||||
|
||||
<!-- jackson start -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.13.3</version>
|
||||
</dependency>
|
||||
<!-- jackson end -->
|
||||
|
||||
<!-- easyexcel start -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
@ -545,7 +551,7 @@
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>${freemarker.version}</version>
|
||||
<version>2.3.31</version>
|
||||
</dependency>
|
||||
<!-- freemarker end -->
|
||||
|
||||
@ -553,7 +559,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
<!-- gson end -->
|
||||
|
||||
@ -561,9 +567,17 @@
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>${jsoup.version}</version>
|
||||
<version>1.14.3</version>
|
||||
</dependency>
|
||||
<!-- jsoup end -->
|
||||
|
||||
<!-- xmlgraphics-commons start -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>xmlgraphics-commons</artifactId>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
<!-- xmlgraphics-commons end -->
|
||||
</dependencies>
|
||||
|
||||
</dependencyManagement>
|
||||
|
Loading…
Reference in New Issue
Block a user