feat:连接池初始化
parent
045f6005a9
commit
bf61f58ae7
|
@ -16,5 +16,11 @@
|
|||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-data-source-remote</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
package com.muyu.data.source.client.config;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.data.source.config.DataSourceConfig;
|
||||
import com.muyu.data.source.domain.DataSource;
|
||||
import com.muyu.data.source.domain.DatabaseType;
|
||||
import com.muyu.data.source.remote.RemoteDataSourceService;
|
||||
import com.muyu.data.source.remote.RemoteDataTypeService;
|
||||
import java.sql.Connection;
|
||||
import java.util.List;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 初始化加载
|
||||
*
|
||||
* @author HuFangMing
|
||||
* @ClassName: SourceClientRunner
|
||||
* @createTime: 2024/5/13 14:15
|
||||
*/
|
||||
|
||||
@Log4j2
|
||||
@Configuration
|
||||
public class SourceClientRunner implements ApplicationRunner {
|
||||
|
||||
@Autowired
|
||||
private RemoteDataSourceService remoteDataSourceService;
|
||||
@Autowired
|
||||
private RemoteDataTypeService remoteDataTypeService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
Result<List<DataSource>> dataSourceListResult = remoteDataSourceService.getDataSourceList();
|
||||
List<DataSource> dataSourceList = dataSourceListResult.getData();
|
||||
dataSourceList.stream().forEach(dataSource -> {
|
||||
Result<DatabaseType> databaseTypeResult = remoteDataTypeService.getDataType(dataSource.getDatabaseName());
|
||||
DatabaseType databaseType = databaseTypeResult.getData();
|
||||
DataSourceConfig.init(dataSource,databaseType);
|
||||
});
|
||||
Long key = dataSourceList.get(0).getId();
|
||||
log.info("查看连接池");
|
||||
DataSourceConfig.size(key);
|
||||
Thread.sleep(500);
|
||||
log.info("取出一个链接,查看连接池");
|
||||
Connection connection = DataSourceConfig.getConnection(key);
|
||||
DataSourceConfig.size(key);
|
||||
Thread.sleep(500);
|
||||
log.info("返回一个连接,查看连接池");
|
||||
DataSourceConfig.returnConn(connection);
|
||||
DataSourceConfig.size(key);
|
||||
}
|
||||
}
|
|
@ -29,5 +29,82 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
</dependency>
|
||||
<!-- druid数据库连接池-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
</dependency>
|
||||
<!-- pgsql-->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-modules-system</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.data.source.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.pool.DruidPooledConnection;
|
||||
import com.muyu.data.source.domain.DataSource;
|
||||
import com.muyu.data.source.domain.DatabaseType;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 数据源配置连接池
|
||||
*
|
||||
* @author HuFangMing
|
||||
* @ClassName: DataSourceConfig
|
||||
* @createTime: 2024/5/13 15:25
|
||||
*/
|
||||
|
||||
@Component
|
||||
@Log4j2
|
||||
public class DataSourceConfig {
|
||||
private static HashMap<Long, DruidDataSource> dataSourceMap=new HashMap<>();
|
||||
|
||||
public static void init(DataSource dataSource, DatabaseType databaseType){
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
druidDataSource.setUsername(dataSource.getUser());
|
||||
druidDataSource.setPassword(dataSource.getPassword());
|
||||
druidDataSource.setUrl(databaseType.getUrlPre()+dataSource.getHost()+":"+dataSource.getPort()+"/"+dataSource.getDatabaseName()+"?"+dataSource.getConnectionParam());
|
||||
druidDataSource.setDriverClassName(databaseType.getDriverManager());
|
||||
druidDataSource.setMinIdle(Math.toIntExact(dataSource.getMaxWaitSize()));
|
||||
druidDataSource.setMaxActive(Math.toIntExact(dataSource.getMaxNum()));
|
||||
druidDataSource.setInitialSize(Math.toIntExact(dataSource.getInitNum()));
|
||||
|
||||
try {
|
||||
druidDataSource.init();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
dataSourceMap.put(dataSource.getId(), druidDataSource);
|
||||
}
|
||||
|
||||
public static Connection getConnection(Long key){
|
||||
DruidDataSource druidDataSource=dataSourceMap.get(key);
|
||||
try {
|
||||
DruidPooledConnection connection = druidDataSource.getConnection();
|
||||
return connection;
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void returnConn(Connection connection){
|
||||
try {
|
||||
connection.close();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void size(Long key){
|
||||
DruidDataSource druidDataSource=dataSourceMap.get(key);
|
||||
int activeCount = druidDataSource.getActiveCount();
|
||||
int poolingCount = druidDataSource.getPoolingCount();
|
||||
log.info(key+"连接池正在使用连接"+activeCount+"个,线程池中线程数量"+poolingCount+"个");
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package com.muyu.data.source.remote;
|
|||
import com.muyu.common.core.constant.ServiceNameConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.data.source.domain.DataSource;
|
||||
import com.muyu.data.source.remote.factory.RemoteDataSourceFactory;
|
||||
import java.util.List;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -17,10 +18,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
@FeignClient(contextId ="RemoteDataSourceService",
|
||||
value = ServiceNameConstants.SOURCE_SERVICE,
|
||||
fallbackFactory = RemoteDataSourceFactory.class,
|
||||
path = "/data"
|
||||
path = "/data/source"
|
||||
)
|
||||
|
||||
public interface RemoteDataSourceService {
|
||||
@GetMapping("/getDataSourceList")
|
||||
@GetMapping("getDataSourceList/")
|
||||
public Result<List<DataSource>> getDataSourceList();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.muyu.data.source.remote;
|
||||
package com.muyu.data.source.remote.factory;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.data.source.domain.DataSource;
|
||||
import com.muyu.data.source.remote.RemoteDataSourceService;
|
||||
import java.util.List;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.muyu.data.source.remote.factory;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.data.source.domain.DatabaseType;
|
||||
import com.muyu.data.source.remote.RemoteDataTypeService;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
||||
/**
|
||||
* 熔断
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/10 星期五
|
||||
*/
|
||||
public class RemoteDataTypeFactory implements FallbackFactory<RemoteDataTypeService> {
|
||||
@Override
|
||||
public RemoteDataTypeService create(Throwable cause) {
|
||||
return new RemoteDataTypeService() {
|
||||
@Override
|
||||
public Result<DatabaseType> getDataType(String databaseName) {
|
||||
return Result.error(cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
com.muyu.source.remote.factory.RemoteDataSourceFactory
|
||||
com.muyu.source.remote.factory.RemoteDataTypeFactory
|
|
@ -55,6 +55,18 @@ public class DataSourceController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据源列表信息
|
||||
*/
|
||||
|
||||
@ApiOperation("获取数据源列表信息")
|
||||
@GetMapping("/getDataSourceList")
|
||||
public Result<List<DataSource>> getDataSourceList(){
|
||||
List<DataSource> list=dataSourceService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据源列表
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.data.source.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
@ -109,8 +110,16 @@ public class DatabaseTypeController extends BaseController {
|
|||
return toAjax(databaseTypeService.removeBatchByIds(databaseIds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据源类型对象
|
||||
*/
|
||||
@ApiOperation("查询数据源类型对象")
|
||||
@GetMapping("/getDatabaseType/{databaseName}")
|
||||
public Result<DatabaseType> getDatabaseType(@PathVariable("databaseName") String databaseName) {
|
||||
return Result.success(databaseTypeService.getOne(new LambdaQueryWrapper<>(){{
|
||||
eq(DatabaseType::getDatabaseName,databaseName);
|
||||
}}));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-modules</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-data-test</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-data-source-client</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-rule-client</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
package data.test;
|
||||
|
||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 数据测试启动类
|
||||
*
|
||||
* @author HuFangMing
|
||||
* @ClassName: MuYuDataTestApplication
|
||||
* @createTime: 2024/5/13 9:40
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
||||
public class MuYuDataTestApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MuYuDataTestApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9260
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: muyu-data-test
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.16.128:8848
|
||||
namespace: ry
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.16.128:8848
|
||||
namespace: ry
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/muyu-data-test"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.muyu" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -1,32 +0,0 @@
|
|||
package com.muyu.rule.client.config;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.ruleEngine.domain.EngineMaintenance;
|
||||
import com.muyu.ruleEngine.remote.RemoteEngineMaintenanceService;
|
||||
import java.util.List;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
|
||||
/**
|
||||
* 初始化加载
|
||||
*
|
||||
* @author HuFangMing
|
||||
* @ClassName: RuleEngineClientRunner
|
||||
* @createTime: 2024/5/10 15:17
|
||||
*/
|
||||
|
||||
@Log4j2
|
||||
public class RuleEngineClientRunner implements ApplicationRunner {
|
||||
@Autowired
|
||||
private RemoteEngineMaintenanceService engineMaintenanceService;
|
||||
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
Result<List<EngineMaintenance>> maintenanceList = engineMaintenanceService.getMaintenanceList();
|
||||
|
||||
log.info(maintenanceList);
|
||||
}
|
||||
}
|
|
@ -15,6 +15,7 @@
|
|||
<module>muyu-file</module>
|
||||
<module>muyu-data-source</module>
|
||||
<module>muyu-rule_engine</module>
|
||||
<module>muyu-data-test</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>muyu-modules</artifactId>
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -37,6 +37,7 @@
|
|||
<jedis.version>2.9.0</jedis.version>
|
||||
<postgresql.version>42.5.0</postgresql.version>
|
||||
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
|
||||
<druid.version>1.2.6</druid.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
@ -143,7 +144,12 @@
|
|||
<artifactId>fastjson2</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--druid数据库连接池-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<!-- JWT -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
|
|
Loading…
Reference in New Issue