fix:重构模块分层,构建客户端
parent
1c85e3f6d1
commit
6997b2e5f8
|
@ -20,4 +20,14 @@ public class ServiceNameConstants {
|
|||
* 文件服务的serviceid
|
||||
*/
|
||||
public static final String FILE_SERVICE = "muyu-file";
|
||||
|
||||
/**
|
||||
* 数据源的serviceid
|
||||
*/
|
||||
public static final String SOURCE_SERVICE = "muyu-source";
|
||||
|
||||
/**
|
||||
* 规则引擎的serviceid
|
||||
*/
|
||||
public static final String RULE_ENGINE_SERVICE = "muyu-rule-engine";
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
*
|
||||
* @author muyu
|
||||
*/
|
||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||
@FeignClient(contextId = "remoteFileService",
|
||||
value = ServiceNameConstants.FILE_SERVICE,
|
||||
fallbackFactory = RemoteFileFallbackFactory.class)
|
||||
public interface RemoteFileService {
|
||||
/**
|
||||
* 上传文件
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
<?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-source-client</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-rule-engine-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,24 @@
|
|||
package com.muyu.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 CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
||||
public class MuYuDataTestApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MuYuDataTestApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9210
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
redis:
|
||||
host: 111.229.37.54
|
||||
port: 6379
|
||||
password:
|
||||
application:
|
||||
# 应用名称
|
||||
name: muyu-data-test
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 111.229.37.54:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 111.229.37.54:8848
|
||||
namespace: a7ca2016-3e34-485e-95ea-e0ea98d6c647
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
logging:
|
||||
level:
|
||||
com.muyu.system.mapper: DEBUG
|
|
@ -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>
|
|
@ -0,0 +1,28 @@
|
|||
<?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-rule-engine</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-rule-engine-client</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-rule-engine-remote</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.rule.engine.client.config;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* 规则引擎客户端配置类
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@ComponentScan
|
||||
@Import(value = {RuleEngineClientRunner.class})
|
||||
public class RuleEngineClientConfig {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.rule.engine.client.config;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.ruleEngine.domain.EngineMaintenance;
|
||||
import com.muyu.rule.remote.RemoteEngineMaintenanceService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 初始化加载
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.rule.engine.client.config.RuleEngineClientConfig
|
|
@ -8,11 +8,6 @@ package com.muyu.ruleEngine.constant;
|
|||
*/
|
||||
public class EngineVersionConstants {
|
||||
|
||||
/**
|
||||
* 默认版本名
|
||||
*/
|
||||
public final static String DEFAULT_CLASS = "engine_custom";
|
||||
|
||||
/**
|
||||
* 作用域引擎
|
||||
*/
|
||||
|
|
|
@ -19,4 +19,17 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-rule-engine-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.rule.remote;
|
||||
|
||||
import com.muyu.common.core.constant.ServiceNameConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.rule.remote.factory.RemoteEngineMaintenanceFactory;
|
||||
import com.muyu.ruleEngine.domain.EngineMaintenance;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据源远程调用
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@FeignClient(contextId = "RemoteEngineMaintenanceService",
|
||||
value = ServiceNameConstants.RULE_ENGINE_SERVICE,
|
||||
fallbackFactory = RemoteEngineMaintenanceFactory.class,
|
||||
path = "/maintenance"
|
||||
)
|
||||
public interface RemoteEngineMaintenanceService {
|
||||
@GetMapping("/getMaintenanceList")
|
||||
public Result<List<EngineMaintenance>> getMaintenanceList();
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.muyu.rule.remote.factory;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.rule.remote.RemoteEngineMaintenanceService;
|
||||
import com.muyu.ruleEngine.domain.EngineMaintenance;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 熔断
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
public class RemoteEngineMaintenanceFactory implements FallbackFactory<RemoteEngineMaintenanceService>{
|
||||
|
||||
@Override
|
||||
public RemoteEngineMaintenanceService create(Throwable cause) {
|
||||
return new RemoteEngineMaintenanceService() {
|
||||
@Override
|
||||
public Result<List<EngineMaintenance>> getMaintenanceList() {
|
||||
return Result.error(cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.rule.remote.factory.RemoteEngineMaintenanceFactory
|
|
@ -34,9 +34,16 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/maintenance")
|
||||
public class EngineMaintenanceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private EngineMaintenanceService engineMaintenanceService;
|
||||
|
||||
@GetMapping("/getMaintenanceList")
|
||||
public Result<List<EngineMaintenance>> getMaintenanceList() {
|
||||
List<EngineMaintenance> list = engineMaintenanceService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询引擎维护列表
|
||||
*/
|
||||
|
|
|
@ -46,15 +46,19 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
List<EngineConfigScopeResp> list = new ArrayList<>();
|
||||
try {
|
||||
int i = 0;
|
||||
for (String s : ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY) {
|
||||
for (String scope : ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY) {
|
||||
if (i == 0) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
String path = ConfigCodeConstants.BASE_FILE_PATH + s;
|
||||
String path = ConfigCodeConstants.BASE_FILE_PATH + scope;
|
||||
String code = Files.readString(Paths.get(path));
|
||||
String type = ConfigCodeConstants.CONFIG_FILE_TYPE_ARRAY[i++];
|
||||
list.add(EngineConfigScopeResp.builder().type(type).name(s).code(code).build());
|
||||
list.add(EngineConfigScopeResp.builder()
|
||||
.type(type)
|
||||
.name(scope)
|
||||
.code(code)
|
||||
.build());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
@ -120,8 +124,8 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
public Object ruleTest(TestData testData) {
|
||||
Object result = null;
|
||||
try {
|
||||
EngineVersion config = this.getById(testData.getId());
|
||||
String content = config.getRuleContent().replaceAll("\r\n", "");
|
||||
EngineVersion engineVersion = this.getById(testData.getId());
|
||||
String content = engineVersion.getRuleContent().replaceAll("\r\n", "");
|
||||
// 对source进行编译生成class文件存放在Map中,这里用bytecode接收
|
||||
Map<String, byte[]> bytecode = DynamicLoader.compile(RuleOperationConstants.CLASS_NAME +
|
||||
RuleOperationConstants.FILE_SUFFIX, content);
|
||||
|
@ -144,7 +148,7 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
|
||||
@Override
|
||||
public VersionClassCreateResp createVersionClass(VersionClassCreateReq req) {
|
||||
String versionClass = EngineVersionConstants.DEFAULT_CLASS + "_" + req.getEngineCode() + "_" + req.getVersionCode();
|
||||
String versionClass = "engine_custom" + "_" + req.getEngineCode() + "_" + req.getVersionCode();
|
||||
EngineConfigScopeResp scopeResp = this.getScopeInfoById(0);
|
||||
String code = scopeResp.getCode().replaceAll("name", versionClass)
|
||||
.replaceAll("Engine", EngineVersionConstants.ENGINE[req.getScope() - 1])
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/muyu-ruleEngine"/>
|
||||
<property name="log.path" value="logs/muyu-rule-engine"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<module>muyu-rule-engine-common</module>
|
||||
<module>muyu-rule-engine-remote</module>
|
||||
<module>muyu-rule-engine-server</module>
|
||||
<module>muyu-rule-engine-client</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?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-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-source-client</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-source-remote</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.rule.client.config;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* 数据接入客户端配置类
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@ComponentScan
|
||||
@Import(value = {SourceClientRunner.class})
|
||||
public class SourceClientConfig {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.rule.client.config;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
import com.muyu.rule.remote.RemoteDataSourceService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 初始化加载
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@Log4j2
|
||||
public class SourceClientRunner implements ApplicationRunner {
|
||||
|
||||
@Autowired
|
||||
private RemoteDataSourceService remoteDataSourceService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
Result<List<DataSource>> dataSourceList = remoteDataSourceService.getDataSourceList();
|
||||
|
||||
log.info(dataSourceList);
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.rule.client.config.SourceClientConfig
|
|
@ -0,0 +1,32 @@
|
|||
<?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-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-source-common</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>
|
||||
<!-- MuYu Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-security</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -1,9 +1,8 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
@ -11,9 +11,9 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.source.domain.req.DataSourceQueryReq;
|
||||
import com.muyu.source.domain.req.DataSourceSaveReq;
|
||||
import com.muyu.source.domain.req.DataSourceEditReq;
|
||||
import com.muyu.rule.domain.req.DataSourceQueryReq;
|
||||
import com.muyu.rule.domain.req.DataSourceSaveReq;
|
||||
import com.muyu.rule.domain.req.DataSourceEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -80,20 +80,15 @@ public class DataSource extends BaseEntity {
|
|||
@ApiModelProperty(name = "密码", value = "密码")
|
||||
private String password;
|
||||
|
||||
/** 类型 '查询'/'存储' */
|
||||
@Excel(name = "类型 '查询'/'存储'")
|
||||
@ApiModelProperty(name = "类型 '查询'/'存储'", value = "类型 '查询'/'存储'")
|
||||
private String type;
|
||||
|
||||
/** 数据连接参数 */
|
||||
@Excel(name = "数据连接参数")
|
||||
@ApiModelProperty(name = "数据连接参数", value = "数据连接参数")
|
||||
private String connectionParam;
|
||||
|
||||
/** 状态 'Y'/'N' */
|
||||
@Excel(name = "状态 'Y'/'N'")
|
||||
@ApiModelProperty(name = "状态 'Y'/'N'", value = "状态 'Y'/'N'")
|
||||
private String status;
|
||||
@Excel(name = "是否初始化")
|
||||
@ApiModelProperty(name = "是否初始化", value = "是否初始化")
|
||||
private String isInit;
|
||||
|
||||
/** 初始连接数量 */
|
||||
@Excel(name = "初始连接数量")
|
||||
|
@ -138,8 +133,8 @@ public class DataSource extends BaseEntity {
|
|||
.databaseName(dataSourceSaveReq.getDatabaseName())
|
||||
.user(dataSourceSaveReq.getUser())
|
||||
.password(dataSourceSaveReq.getPassword())
|
||||
.type(dataSourceSaveReq.getType())
|
||||
.connectionParam(dataSourceSaveReq.getConnectionParam())
|
||||
.isInit(dataSourceSaveReq.getIsInit())
|
||||
.initNum(dataSourceSaveReq.getInitNum())
|
||||
.maxNum(dataSourceSaveReq.getMaxNum())
|
||||
.maxWaitTime(dataSourceSaveReq.getMaxWaitTime())
|
||||
|
@ -164,8 +159,8 @@ public class DataSource extends BaseEntity {
|
|||
.databaseName(dataSourceEditReq.getDatabaseName())
|
||||
.user(dataSourceEditReq.getUser())
|
||||
.password(dataSourceEditReq.getPassword())
|
||||
.type(dataSourceEditReq.getType())
|
||||
.connectionParam(dataSourceEditReq.getConnectionParam())
|
||||
.isInit(dataSourceEditReq.getIsInit())
|
||||
.initNum(dataSourceEditReq.getInitNum())
|
||||
.maxNum(dataSourceEditReq.getMaxNum())
|
||||
.maxWaitTime(dataSourceEditReq.getMaxWaitTime())
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.rule.domain.resp.DictDataResp;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain;
|
||||
package com.muyu.rule.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain.req;
|
||||
package com.muyu.rule.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.source.domain.req;
|
||||
package com.muyu.rule.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
@ -55,17 +54,13 @@ public class DataSourceEditReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "密码", value = "密码")
|
||||
private String password;
|
||||
|
||||
/** 类型 '查询'/'存储' */
|
||||
@ApiModelProperty(name = "类型 '查询'/'存储'", value = "类型 '查询'/'存储'")
|
||||
private String type;
|
||||
|
||||
/** 数据连接参数 */
|
||||
@ApiModelProperty(name = "数据连接参数", value = "数据连接参数")
|
||||
private String connectionParam;
|
||||
|
||||
/** 状态 'Y'/'N' */
|
||||
@ApiModelProperty(name = "状态 'Y'/'N'", value = "状态 'Y'/'N'")
|
||||
private String status;
|
||||
/** 是否初始化 */
|
||||
@ApiModelProperty(name = "是否初始化", value = "是否初始化")
|
||||
private String isInit;
|
||||
|
||||
/** 初始连接数量 */
|
||||
@ApiModelProperty(name = "初始连接数量", value = "初始连接数量")
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.source.domain.req;
|
||||
package com.muyu.rule.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.source.domain.req;
|
||||
package com.muyu.rule.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
@ -68,20 +67,15 @@ public class DataSourceSaveReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "密码", value = "密码")
|
||||
private String password;
|
||||
|
||||
/** 类型 '查询'/'存储' */
|
||||
|
||||
@ApiModelProperty(name = "类型 '查询'/'存储'", value = "类型 '查询'/'存储'")
|
||||
private String type;
|
||||
|
||||
/** 数据连接参数 */
|
||||
|
||||
@ApiModelProperty(name = "数据连接参数", value = "数据连接参数")
|
||||
private String connectionParam;
|
||||
|
||||
/** 状态 'Y'/'N' */
|
||||
/** 是否初始化 */
|
||||
|
||||
@ApiModelProperty(name = "状态 'Y'/'N'", value = "状态 'Y'/'N'")
|
||||
private String status;
|
||||
@ApiModelProperty(name = "是否初始化", value = "是否初始化")
|
||||
private String isInit;
|
||||
|
||||
/** 初始连接数量 */
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain.req;
|
||||
package com.muyu.rule.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain.resp;
|
||||
package com.muyu.rule.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.domain.resp;
|
||||
package com.muyu.rule.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
|
@ -1,6 +1,6 @@
|
|||
package com.muyu.source.domain.resp;
|
||||
package com.muyu.rule.domain.resp;
|
||||
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
|
@ -0,0 +1,33 @@
|
|||
<?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-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-source-remote</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-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-source-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.rule.remote;
|
||||
|
||||
import com.muyu.common.core.constant.ServiceNameConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
import com.muyu.rule.remote.factory.RemoteDataSourceFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据源远程调用
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
@FeignClient(contextId = "RemoteDataSourceService",
|
||||
value = ServiceNameConstants.SOURCE_SERVICE,
|
||||
fallbackFactory = RemoteDataSourceFactory.class,
|
||||
path = "/data"
|
||||
)
|
||||
public interface RemoteDataSourceService {
|
||||
@GetMapping("/getDataSourceList")
|
||||
public Result<List<DataSource>> getDataSourceList();
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.rule.remote.factory;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
import com.muyu.rule.remote.RemoteDataSourceService;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 熔断
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/9 星期四
|
||||
*/
|
||||
public class RemoteDataSourceFactory implements FallbackFactory<RemoteDataSourceService> {
|
||||
@Override
|
||||
public RemoteDataSourceService create(Throwable cause) {
|
||||
return new RemoteDataSourceService() {
|
||||
@Override
|
||||
public Result<List<DataSource>> getDataSourceList() {
|
||||
return Result.error(cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.rule.remote.factory.RemoteDataSourceFactory
|
|
@ -0,0 +1,128 @@
|
|||
<?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-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-source-server</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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>2.9.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加 PostgreSQL JDBC 驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-source-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,11 +1,10 @@
|
|||
package com.muyu.source;
|
||||
package com.muyu.rule;
|
||||
|
||||
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.scheduling.annotation.EnableAsync;
|
||||
|
||||
/**
|
||||
* 系统模块
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.AssetAccredit;
|
||||
import com.muyu.source.domain.req.AssetAccreditQueryReq;
|
||||
import com.muyu.source.service.AssetAccreditService;
|
||||
import com.muyu.rule.domain.AssetAccredit;
|
||||
import com.muyu.rule.domain.req.AssetAccreditQueryReq;
|
||||
import com.muyu.rule.service.AssetAccreditService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.source.service.ChildrenService;
|
||||
import com.muyu.rule.domain.Children;
|
||||
import com.muyu.rule.service.ChildrenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
@ -1,14 +1,14 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.muyu.source.domain.AssetDataSource;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.source.domain.TableData;
|
||||
import com.muyu.source.domain.resp.AssetShowResp;
|
||||
import com.muyu.source.domain.resp.CountResp;
|
||||
import com.muyu.rule.domain.AssetDataSource;
|
||||
import com.muyu.rule.domain.Children;
|
||||
import com.muyu.rule.domain.TableData;
|
||||
import com.muyu.rule.domain.resp.AssetShowResp;
|
||||
import com.muyu.rule.domain.resp.CountResp;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -18,11 +18,11 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.source.domain.DataSource;
|
||||
import com.muyu.source.domain.req.DataSourceQueryReq;
|
||||
import com.muyu.source.domain.req.DataSourceSaveReq;
|
||||
import com.muyu.source.domain.req.DataSourceEditReq;
|
||||
import com.muyu.source.service.DataSourceService;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
import com.muyu.rule.domain.req.DataSourceQueryReq;
|
||||
import com.muyu.rule.domain.req.DataSourceSaveReq;
|
||||
import com.muyu.rule.domain.req.DataSourceEditReq;
|
||||
import com.muyu.rule.service.DataSourceService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
|
@ -39,6 +39,12 @@ public class DataSourceController extends BaseController {
|
|||
@Autowired
|
||||
private DataSourceService dataSourceService;
|
||||
|
||||
@GetMapping("/getDataSourceList")
|
||||
public Result<List<DataSource>> getDataSourceList() {
|
||||
List<DataSource> list = dataSourceService.list();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据源列表
|
||||
*/
|
||||
|
@ -105,7 +111,7 @@ public class DataSourceController extends BaseController {
|
|||
Boolean b = dataSourceService.test(dataSource);
|
||||
if (b) {
|
||||
dataSourceService.update(new LambdaUpdateWrapper<>() {{
|
||||
set(DataSource::getStatus, "Y");
|
||||
set(DataSource::getIsInit, "Y");
|
||||
eq(DataSource::getId, dataSource.getId());
|
||||
}});
|
||||
return Result.success(b, "连接成功");
|
|
@ -1,12 +1,10 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.DataType;
|
||||
import com.muyu.source.service.DataTypeService;
|
||||
import com.muyu.rule.domain.DataType;
|
||||
import com.muyu.rule.service.DataTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import com.muyu.rule.service.DictDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.source.service.DictTypeService;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import com.muyu.rule.domain.DictType;
|
||||
import com.muyu.rule.domain.req.DictTypeReq;
|
||||
import com.muyu.rule.domain.resp.DictDataResp;
|
||||
import com.muyu.rule.service.DictDataService;
|
||||
import com.muyu.rule.service.DictTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.controller;
|
||||
package com.muyu.rule.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.AssetAccredit;
|
||||
import com.muyu.rule.domain.AssetAccredit;
|
||||
|
||||
/**
|
||||
* 资产授权mapper层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.AssetDataSource;
|
||||
import com.muyu.rule.domain.AssetDataSource;
|
||||
|
||||
/**
|
||||
* 资产数据源mapper层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.rule.domain.Children;
|
||||
|
||||
/**
|
||||
* 数据库结构mapper
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.DataSource;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
|
||||
/**数据源Mapper接口
|
||||
*
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.DataType;
|
||||
import com.muyu.rule.domain.DataType;
|
||||
|
||||
/**
|
||||
* 数据库类型mapper层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
|
||||
/**
|
||||
* 字典数据mapper层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.rule.domain.DictType;
|
||||
|
||||
/**
|
||||
* 字典类型mapper层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.mapper;
|
||||
package com.muyu.rule.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.TableData;
|
||||
import com.muyu.rule.domain.TableData;
|
||||
|
||||
/**
|
||||
* 表结构mapper层
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.AssetAccredit;
|
||||
import com.muyu.source.domain.req.AssetAccreditQueryReq;
|
||||
import com.muyu.rule.domain.AssetAccredit;
|
||||
import com.muyu.rule.domain.req.AssetAccreditQueryReq;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.AssetDataSource;
|
||||
import com.muyu.rule.domain.AssetDataSource;
|
||||
|
||||
/**
|
||||
* 资产数据源service层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.rule.domain.Children;
|
||||
|
||||
/**
|
||||
* 数据库结构业务层
|
|
@ -1,15 +1,15 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import com.muyu.source.domain.AssetDataSource;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.source.domain.DataSource;
|
||||
import com.muyu.rule.domain.AssetDataSource;
|
||||
import com.muyu.rule.domain.Children;
|
||||
import com.muyu.rule.domain.DataSource;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.TableData;
|
||||
import com.muyu.source.domain.resp.AssetShowResp;
|
||||
import com.muyu.source.domain.resp.CountResp;
|
||||
import com.muyu.rule.domain.TableData;
|
||||
import com.muyu.rule.domain.resp.AssetShowResp;
|
||||
import com.muyu.rule.domain.resp.CountResp;
|
||||
|
||||
/**
|
||||
* 数据源Service接口
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.DataType;
|
||||
import com.muyu.rule.domain.DataType;
|
||||
|
||||
/**
|
||||
* 业务层
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
|
||||
/**
|
||||
* 字典数据业务层
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import com.muyu.rule.domain.DictType;
|
||||
import com.muyu.rule.domain.req.DictTypeReq;
|
||||
import com.muyu.rule.domain.resp.DictDataResp;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.source.service;
|
||||
package com.muyu.rule.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.TableData;
|
||||
import com.muyu.rule.domain.TableData;
|
||||
|
||||
/**
|
||||
* 表结构业务层
|
|
@ -1,12 +1,12 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.exception.ServiceException;
|
||||
import com.muyu.source.domain.AssetAccredit;
|
||||
import com.muyu.source.domain.req.AssetAccreditQueryReq;
|
||||
import com.muyu.source.mapper.AssetAccreditMapper;
|
||||
import com.muyu.source.service.AssetAccreditService;
|
||||
import com.muyu.rule.domain.AssetAccredit;
|
||||
import com.muyu.rule.domain.req.AssetAccreditQueryReq;
|
||||
import com.muyu.rule.mapper.AssetAccreditMapper;
|
||||
import com.muyu.rule.service.AssetAccreditService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.AssetDataSource;
|
||||
import com.muyu.source.mapper.AssetDataSourceMapper;
|
||||
import com.muyu.source.service.AssetDataSourceService;
|
||||
import com.muyu.rule.domain.AssetDataSource;
|
||||
import com.muyu.rule.mapper.AssetDataSourceMapper;
|
||||
import com.muyu.rule.service.AssetDataSourceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.Children;
|
||||
import com.muyu.source.mapper.ChildrenMapper;
|
||||
import com.muyu.source.service.ChildrenService;
|
||||
import com.muyu.rule.domain.Children;
|
||||
import com.muyu.rule.mapper.ChildrenMapper;
|
||||
import com.muyu.rule.service.ChildrenService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
|
@ -9,14 +9,14 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
import com.muyu.common.redis.service.RedisService;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.muyu.source.domain.*;
|
||||
import com.muyu.source.domain.resp.AssetShowResp;
|
||||
import com.muyu.source.domain.resp.CountResp;
|
||||
import com.muyu.source.service.*;
|
||||
import com.muyu.rule.domain.*;
|
||||
import com.muyu.rule.domain.resp.AssetShowResp;
|
||||
import com.muyu.rule.domain.resp.CountResp;
|
||||
import com.muyu.rule.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.source.mapper.DataSourceMapper;
|
||||
import com.muyu.rule.mapper.DataSourceMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import redis.clients.jedis.Jedis;
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.DataType;
|
||||
import com.muyu.source.mapper.DataTypeMapper;
|
||||
import com.muyu.source.service.DataTypeService;
|
||||
import com.muyu.rule.domain.DataType;
|
||||
import com.muyu.rule.mapper.DataTypeMapper;
|
||||
import com.muyu.rule.service.DataTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.mapper.DictDataMapper;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import com.muyu.rule.mapper.DictDataMapper;
|
||||
import com.muyu.rule.service.DictDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,14 +1,14 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.source.mapper.DictTypeMapper;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.source.service.DictTypeService;
|
||||
import com.muyu.rule.domain.DictData;
|
||||
import com.muyu.rule.domain.DictType;
|
||||
import com.muyu.rule.domain.req.DictTypeReq;
|
||||
import com.muyu.rule.domain.resp.DictDataResp;
|
||||
import com.muyu.rule.mapper.DictTypeMapper;
|
||||
import com.muyu.rule.service.DictDataService;
|
||||
import com.muyu.rule.service.DictTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.source.service.impl;
|
||||
package com.muyu.rule.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.TableData;
|
||||
import com.muyu.source.mapper.TableDataMapper;
|
||||
import com.muyu.source.service.TableDataService;
|
||||
import com.muyu.rule.domain.TableData;
|
||||
import com.muyu.rule.mapper.TableDataMapper;
|
||||
import com.muyu.rule.service.TableDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/muyu-system"/>
|
||||
<property name="log.path" value="logs/muyu-source"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.source.mapper.DataSourceMapper">
|
||||
|
||||
<resultMap type="com.muyu.source.domain.DataSource" id="DataSourceResult">
|
||||
<resultMap type="com.muyu.rule.domain.DataSource" id="DataSourceResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="systemName" column="system_name"/>
|
|
@ -10,6 +10,13 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>muyu-source</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>muyu-source-common</module>
|
||||
<module>muyu-source-remote</module>
|
||||
<module>muyu-source-server</module>
|
||||
<module>muyu-source-client</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
|
@ -17,106 +24,4 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>2.9.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加 PostgreSQL JDBC 驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<module>muyu-file</module>
|
||||
<module>muyu-source</module>
|
||||
<module>muyu-rule-engine</module>
|
||||
<module>muyu-data-test</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>muyu-modules</artifactId>
|
||||
|
|
Loading…
Reference in New Issue