fase()随机显示和队列显示
parent
28b252bb66
commit
34bf35a398
|
@ -1,13 +1,143 @@
|
||||||
package muyu.data.test.clinet.config;
|
package muyu.data.test.clinet.config;
|
||||||
|
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import muyu.data.test.clinet.config.runner.AccessConfigRunner;
|
import muyu.data.test.clinet.config.runner.AccessConfigRunner;
|
||||||
|
import muyu.data.test.common.dataSoutce.DataSourceConfig;
|
||||||
|
import muyu.data.test.common.domain.DataModel;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.sql.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规则引擎客户端配置类
|
* 规则引擎客户端配置类
|
||||||
*/
|
*/
|
||||||
|
@Log4j2
|
||||||
@ComponentScan
|
@ComponentScan
|
||||||
@Import(value = AccessConfigRunner.class)
|
@Import(value = AccessConfigRunner.class)
|
||||||
public class AccessConfig {
|
public class AccessConfig {
|
||||||
|
public List<DataModel> getRabdomData(Long id, String tableName,Integer ruleLevel) {
|
||||||
|
List<List<DataModel>> listList = new ArrayList<>();
|
||||||
|
Connection connection = DataSourceConfig.getConnection(id);
|
||||||
|
String sql = "select * from " + tableName;
|
||||||
|
try {
|
||||||
|
//获取原数据
|
||||||
|
Statement statement = connection.createStatement();
|
||||||
|
ResultSet resultSet = statement.executeQuery(sql);
|
||||||
|
PreparedStatement pst = connection.prepareStatement("select * from " + tableName);
|
||||||
|
log.info("元数据1:{}",resultSet);
|
||||||
|
// ResultSet resultSet1 = pst.executeQuery();
|
||||||
|
//元数据信息
|
||||||
|
ResultSetMetaData metaData = pst.getMetaData();
|
||||||
|
//元数据数量
|
||||||
|
int columnCount = metaData.getColumnCount();
|
||||||
|
while (resultSet.next()){
|
||||||
|
List<DataModel> list = new ArrayList<>();
|
||||||
|
for (int i = 1; i <= columnCount; i++) {
|
||||||
|
String columnName = metaData.getColumnName(i);
|
||||||
|
log.info("字段名:{}",columnName);
|
||||||
|
String tableName1 = metaData.getTableName(i);
|
||||||
|
log.info("表名:{}",tableName1);
|
||||||
|
String columnClassName = metaData.getColumnClassName(i);
|
||||||
|
log.info("java类型:{}",columnClassName);
|
||||||
|
String columnTypeName = metaData.getColumnTypeName(i);
|
||||||
|
log.info("原类型:{}",columnTypeName);
|
||||||
|
String catalogName = metaData.getCatalogName(i);
|
||||||
|
log.info("数据库名:{}",catalogName);
|
||||||
|
Object object = resultSet.getObject(i);
|
||||||
|
log.info("字段值:{}",object);
|
||||||
|
DataModel build = DataModel.builder()
|
||||||
|
.key(columnName)
|
||||||
|
.val(object)
|
||||||
|
.sourceType(columnTypeName)
|
||||||
|
.processType(columnClassName)
|
||||||
|
.processClass(Class.forName(columnClassName))
|
||||||
|
.build();
|
||||||
|
log.info("测试内容:{}",build);
|
||||||
|
list.add(build);
|
||||||
|
}
|
||||||
|
listList.add(list);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
log.info("长度:{}",listList.size());
|
||||||
|
log.info("列表:{}",listList);
|
||||||
|
if (listList.size() == 0){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (List<DataModel> list : listList) {
|
||||||
|
System.out.println(list);
|
||||||
|
}
|
||||||
|
Random random = new Random();
|
||||||
|
int i = random.nextInt(listList.size());
|
||||||
|
return listList.get(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<List<DataModel>> getColumn(Long id, String tableName, Integer ruleLevel) {
|
||||||
|
List<List<DataModel>> listList = new ArrayList<>();
|
||||||
|
Connection connection = DataSourceConfig.getConnection(id);
|
||||||
|
String sql = "select * from " + tableName;
|
||||||
|
try {
|
||||||
|
//获取原数据
|
||||||
|
Statement statement = connection.createStatement();
|
||||||
|
ResultSet resultSet = statement.executeQuery(sql);
|
||||||
|
PreparedStatement pst = connection.prepareStatement("select * from " + tableName);
|
||||||
|
log.info("元数据1:{}",resultSet);
|
||||||
|
//元数据信息
|
||||||
|
ResultSetMetaData metaData = pst.getMetaData();
|
||||||
|
//元数据数量
|
||||||
|
int columnCount = metaData.getColumnCount();
|
||||||
|
while (resultSet.next()){
|
||||||
|
List<DataModel> list = new ArrayList<>();
|
||||||
|
for (int i = 1; i <= columnCount; i++) {
|
||||||
|
String columnName = metaData.getColumnName(i);
|
||||||
|
String columnClassName = metaData.getColumnClassName(i);
|
||||||
|
String columnTypeName = metaData.getColumnTypeName(i);
|
||||||
|
Object object = resultSet.getObject(i);
|
||||||
|
DataModel build = DataModel.builder()
|
||||||
|
.key(columnName)
|
||||||
|
.val(object)
|
||||||
|
.sourceType(columnTypeName)
|
||||||
|
.processType(columnClassName)
|
||||||
|
.processClass(Class.forName(columnClassName))
|
||||||
|
.build();
|
||||||
|
log.info("测试内容:{}",build);
|
||||||
|
list.add(build);
|
||||||
|
}
|
||||||
|
listList.add(list);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
switch (ruleLevel){
|
||||||
|
case 2, 3:
|
||||||
|
return listList;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
private Map<String, String> getColumnComments(DatabaseMetaData metaData, String typeName) {
|
||||||
|
Map<String, String> columnComents = new HashMap<>();
|
||||||
|
try (ResultSet colums = metaData.getColumns(null, null, typeName, null)) {
|
||||||
|
while (colums.next()) {
|
||||||
|
String columsName = colums.getString("COLUMN_NAME");
|
||||||
|
String columsComment = colums.getString("REMARKS");
|
||||||
|
columnComents.put(columsName, columsComment);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return columnComents;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,18 +52,6 @@ public class AccessConfigRunner implements ApplicationRunner {
|
||||||
DataSourceConfig.index(listResultDatum);
|
DataSourceConfig.index(listResultDatum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//连接上线程池
|
|
||||||
DataAccess dataAccess = listResultData.get(0);
|
|
||||||
DataSourceConfig.verify(dataAccess.getId());
|
|
||||||
//获取一个线程池
|
|
||||||
Connection connection = DataSourceConfig.getConnection(dataAccess.getId());
|
|
||||||
log.info("获取一个线程:{}",connection);
|
|
||||||
DataSourceConfig.verify(dataAccess.getId());
|
|
||||||
//归还线程池
|
|
||||||
DataSourceConfig.returnConnection(connection);
|
|
||||||
DataSourceConfig.verify(dataAccess.getId());
|
|
||||||
//将对象传入Spring
|
|
||||||
//SpringHashMap(hashMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package muyu.data.test.common.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
public class Column {
|
||||||
|
/**
|
||||||
|
* 键 字段名
|
||||||
|
*/
|
||||||
|
private String key;
|
||||||
|
/**
|
||||||
|
* 值 字段值
|
||||||
|
*/
|
||||||
|
private Object val;
|
||||||
|
/**
|
||||||
|
* 原标准 原类型
|
||||||
|
*/
|
||||||
|
private String sourceType;
|
||||||
|
/**
|
||||||
|
* 处理标准
|
||||||
|
*/
|
||||||
|
private String processType;
|
||||||
|
/**
|
||||||
|
* 处理类型
|
||||||
|
*/
|
||||||
|
private Class<?> processClass;
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package muyu.data.test.common.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
public class DataModel {
|
||||||
|
/**
|
||||||
|
* 键 字段名
|
||||||
|
*/
|
||||||
|
private String key;
|
||||||
|
/**
|
||||||
|
* 值 字段值
|
||||||
|
*/
|
||||||
|
private Object val;
|
||||||
|
/**
|
||||||
|
* 原标准 原类型
|
||||||
|
*/
|
||||||
|
private String sourceType;
|
||||||
|
/**
|
||||||
|
* 处理标准
|
||||||
|
*/
|
||||||
|
private String processType;
|
||||||
|
/**
|
||||||
|
* 处理类型
|
||||||
|
*/
|
||||||
|
private Class<?> processClass;
|
||||||
|
}
|
|
@ -1,12 +1,17 @@
|
||||||
package com.data.test.common;
|
package com.data.test.common;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
|
import com.data.test.server.TestService;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import muyu.data.test.common.dataSoutce.DataSourceConfig;
|
import muyu.data.test.common.dataSoutce.DataSourceConfig;
|
||||||
|
import muyu.data.test.common.domain.DataModel;
|
||||||
import muyu.data.test.common.domain.Table;
|
import muyu.data.test.common.domain.Table;
|
||||||
|
import org.bouncycastle.pqc.crypto.newhope.NHSecretKeyProcessor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@ -17,62 +22,22 @@ import java.util.Random;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/data")
|
@RequestMapping("/extract")
|
||||||
public class TestController extends BaseController {
|
public class TestController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private TestService service;
|
||||||
/**
|
/**
|
||||||
* 随机字段
|
* 随机字段
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("randomField")
|
@GetMapping("getRabdomData")
|
||||||
public Result randomField(Long id,String tableName) throws SQLException {
|
public Result<List<DataModel>> getRabdomData(Long id, String tableName,Integer ruleLevel) throws SQLException {
|
||||||
System.out.println("id="+id);
|
return success(service.getRabdomData(id,tableName,ruleLevel));
|
||||||
Connection connection = DataSourceConfig.getConnection(id);
|
|
||||||
DruidDataSource verify = DataSourceConfig.verify(id);
|
|
||||||
System.out.println(verify.getUrl());
|
|
||||||
log.info("获取一个线程池:{}",connection);
|
|
||||||
//运行sql语句
|
|
||||||
Statement statement = connection.createStatement();
|
|
||||||
ResultSet resultSet = statement.executeQuery("select * from " + tableName);
|
|
||||||
//获取meteData
|
|
||||||
ResultSetMetaData metaData = resultSet.getMetaData();
|
|
||||||
//总数量
|
|
||||||
int columnCount = metaData.getColumnCount();
|
|
||||||
//随机数
|
|
||||||
Random random = new Random();
|
|
||||||
List<Table> list = new ArrayList<>();
|
|
||||||
int i = random.nextInt(columnCount)+1;
|
|
||||||
System.out.println("随机数"+i);
|
|
||||||
while (resultSet.next()){
|
|
||||||
for (int i1 = 1; i1 <= columnCount; i1++) {
|
|
||||||
String s = metaData.getColumnName(i1);
|
|
||||||
Object o = resultSet.getObject(i1);
|
|
||||||
System.out.println(s);
|
|
||||||
System.out.println(o);
|
|
||||||
Table build = Table.builder()
|
|
||||||
.key(s)
|
|
||||||
.val(o)
|
|
||||||
.build();
|
|
||||||
list.add(build);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (list.size()==0){
|
@GetMapping("getColumn")
|
||||||
return null;
|
public Result<List<List<DataModel>>> getColumn(Long id, String tableName,Integer ruleLevel) throws Exception {
|
||||||
}
|
return success(service.getColumn(id,tableName,ruleLevel));
|
||||||
int qu = list.size()/columnCount;
|
|
||||||
System.out.println("区间数:"+qu);
|
|
||||||
int in = i*qu;
|
|
||||||
System.out.println("字段长度"+columnCount);
|
|
||||||
System.out.println("新数"+in);
|
|
||||||
System.out.println(list);
|
|
||||||
System.out.println("长度"+list.size());
|
|
||||||
List<Table> tables = new ArrayList<>();
|
|
||||||
for (int idd = i*columnCount-columnCount; idd < i*columnCount; idd++) {
|
|
||||||
System.out.println(idd);
|
|
||||||
tables.add(list.get(idd));
|
|
||||||
}
|
|
||||||
System.out.println(tables);
|
|
||||||
DataSourceConfig.returnConnection(connection);
|
|
||||||
return success(tables);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
package com.data.test.server;
|
package com.data.test.server;
|
||||||
|
|
||||||
|
import muyu.data.test.common.domain.DataModel;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface TestService {
|
public interface TestService {
|
||||||
|
List<DataModel> getRabdomData(Long id, String tableName,Integer ruleLevel) throws SQLException;
|
||||||
|
|
||||||
|
List<List<DataModel>> getColumn(Long id, String tableName, Integer ruleLevel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,25 @@
|
||||||
package com.data.test.server.impl;
|
package com.data.test.server.impl;
|
||||||
|
|
||||||
import com.data.test.server.TestService;
|
import com.data.test.server.TestService;
|
||||||
|
import muyu.data.test.clinet.config.AccessConfig;
|
||||||
|
import muyu.data.test.common.domain.DataModel;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class TestServiceImpl implements TestService {
|
public class TestServiceImpl implements TestService {
|
||||||
|
@Autowired
|
||||||
|
private AccessConfig accessConfig;
|
||||||
|
@Override
|
||||||
|
public List<DataModel> getRabdomData(Long id, String tableName, Integer ruleLevel) throws SQLException {
|
||||||
|
return accessConfig.getRabdomData(id,tableName,ruleLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<List<DataModel>> getColumn(Long id, String tableName, Integer ruleLevel) {
|
||||||
|
return accessConfig.getColumn(id,tableName,ruleLevel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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-goods-edition</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>muyu-goods-edition-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>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-modules-system</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -90,9 +90,4 @@ public class DataSourceConfig {
|
||||||
// 获取连接
|
// 获取连接
|
||||||
log.info("查看连接上的线程池:{}",dataSource);
|
log.info("查看连接上的线程池:{}",dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Bean
|
|
||||||
// public static HashMap<Long,DruidDataSource> SpringHashMap(HashMap<Long, DruidDataSource> hashMap) {
|
|
||||||
// return hashMap;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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-goods-edition</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>muyu-goods-edition-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-goods-edition-common</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,138 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
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-goods-edition</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>muyu-goods-edition-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>
|
||||||
|
<!-- ruoyi-rule_engine-common 规则引擎公共模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-goods-edition-common</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>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</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>
|
||||||
|
|
||||||
|
<!-- Sql Server 驱动 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
<version>9.4.0.jre8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-goods-edition-clinet</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</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>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.muyu.ruleEngine.GtlRuleEngineApplication</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9508
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: muyu-rule
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 129.211.23.219:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 129.211.23.219:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.muyu.edition.mapper: DEBUG
|
Loading…
Reference in New Issue