csw il y a 6 mois
Parent
commit
d3e580cd74

+ 49 - 86
pom.xml

@@ -1,120 +1,83 @@
 <?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
 	<parent>
-		<groupId>org.springframework.boot</groupId>
-		<artifactId>spring-boot-starter-parent</artifactId>
-		<version>3.2.5</version>
-		<relativePath/> <!-- lookup parent from repository -->
+		<artifactId>three-framework</artifactId>
+		<groupId>com.three</groupId>
+		<version>2.0</version>
 	</parent>
-	<groupId>com.ecnu</groupId>
-	<artifactId>smart-port-platform</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<name>smart-port-platform</name>
-	<description>smart port platform</description>
-	<properties>
-		<java.version>17</java.version>
-		<spring-boot.version>3.2.5</spring-boot.version>
-	</properties>
+	<modelVersion>4.0.0</modelVersion>
 
-	<repositories>
-		<repository>
-			<id>aliyun</id>
-			<name>aliyun</name>
-			<url>https://maven.aliyun.com/repository/public</url>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
+	<artifactId>auth-server</artifactId>
+	<packaging>jar</packaging>
+	<version>2.0</version>
 
 	<dependencies>
-<!--		<dependency>-->
-<!--			<groupId>org.springframework.boot</groupId>-->
-<!--			<artifactId>spring-boot-starter</artifactId>-->
-<!--		</dependency>-->
+
+		<!--        <dependency>-->
+		<!--            <groupId>com.three</groupId>-->
+		<!--            <artifactId>three-client</artifactId>-->
+		<!--            <version>2.0</version>-->
+		<!--        </dependency>-->
 
 		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-web</artifactId>
-			<version>3.2.5</version>
+			<groupId>com.three</groupId>
+			<artifactId>three-data-api</artifactId>
+			<version>2.0</version>
 		</dependency>
 
 		<dependency>
-			<groupId>com.mysql</groupId>
-			<artifactId>mysql-connector-j</artifactId>
-			<scope>runtime</scope>
+			<groupId>com.three</groupId>
+			<artifactId>three-data-api-dm</artifactId>
+			<version>2.0</version>
 		</dependency>
+
+		<dependency>
+			<groupId>com.three</groupId>
+			<artifactId>three-datasource</artifactId>
+			<version>2.0</version>
+		</dependency>
+
 		<dependency>
-			<groupId>org.projectlombok</groupId>
-			<artifactId>lombok</artifactId>
-			<optional>true</optional>
+			<groupId>com.three</groupId>
+			<artifactId>three-redis</artifactId>
+			<version>2.0</version>
 		</dependency>
+
+<!--		<dependency>-->
+<!--			<groupId>com.three</groupId>-->
+<!--			<artifactId>three-auth</artifactId>-->
+<!--			<version>2.0</version>-->
+<!--		</dependency>-->
+
 		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-test</artifactId>
-			<scope>test</scope>
+			<groupId>com.three</groupId>
+			<artifactId>three-security</artifactId>
+			<version>2.0</version>
 		</dependency>
 
 		<dependency>
-			<groupId>org.mybatis.spring.boot</groupId>
-			<artifactId>mybatis-spring-boot-starter</artifactId>
-			<version>3.0.3</version>
+			<groupId>com.three</groupId>
+			<artifactId>three-quartz</artifactId>
+			<version>2.0</version>
 		</dependency>
 
+		<!--<dependency>-->
+		<!--<groupId>com.three</groupId>-->
+		<!--<artifactId>three-message</artifactId>-->
+		<!--<version>1.0</version>-->
+		<!--</dependency>-->
+
 	</dependencies>
 
+
 	<build>
 		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.8.1</version>
-				<configuration>
-					<source>1.8</source>
-					<target>1.8</target>
-					<encoding>UTF-8</encoding>
-				</configuration>
-			</plugin>
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<version>${spring-boot.version}</version>
-				<configuration>
-					<mainClass>com.ecnu.platform.SmartPortPlatformApplication</mainClass>
-					<layout>JAR</layout>
-				</configuration>
-				<executions>
-					<execution>
-						<id>repackage</id>
-						<goals>
-							<goal>repackage</goal>
-						</goals>
-					</execution>
-				</executions>
 			</plugin>
 		</plugins>
 	</build>
 
-<!--	<build>-->
-<!--		<plugins>-->
-<!--			<plugin>-->
-<!--				<groupId>org.springframework.boot</groupId>-->
-<!--				<artifactId>spring-boot-maven-plugin</artifactId>-->
-<!--				<configuration>-->
-<!--					<excludes>-->
-<!--						<exclude>-->
-<!--							<groupId>org.projectlombok</groupId>-->
-<!--							<artifactId>lombok</artifactId>-->
-<!--						</exclude>-->
-<!--					</excludes>-->
-<!--				</configuration>-->
-<!--			</plugin>-->
-<!--		</plugins>-->
-<!--	</build>-->
-
 </project>

+ 20 - 0
sql/db.sql

@@ -0,0 +1,20 @@
+-- 算法定义
+CREATE TABLE ALG_DEFINITION (
+    GKEY                  VARCHAR(50) NOT NULL                    COMMENT '主键',
+    ID                    VARCHAR(100) NOT NULL                   COMMENT '算法ID',
+    NAME                  VARCHAR(200) NOT NULL                    COMMENT '算法名称',
+    DESCRIPTION           VARCHAR(500)                             COMMENT '算法描述',
+    VERSION               VARCHAR(50) NOT NULL                    COMMENT '版本号',
+    TIME_STANDARD         VARCHAR(200)                            COMMENT '耗时要求',
+    CALL_METHOD           VARCHAR(200)                            COMMENT '调用方法',
+    USE_LEVEL             VARCHAR(100)                            COMMENT '使用级别',
+    INPUT_EXPLAIN         longtext                              COMMENT '输入数据说明',
+    OUT_EXPLAIN           longtext                              COMMENT '输出数据说明',
+    EVALUATION_EXPLAIN    longtext                              COMMENT '评价指标说明',
+    CREATED               DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
+    CREATOR               VARCHAR(100) DEFAULT 'sys' NOT NULL         COMMENT '创建人',
+    CHANGED               DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '修改时间',
+    CHANGER               VARCHAR(100) DEFAULT 'sys' NOT NULL         COMMENT '修改人',
+    IS_DELETED            INT(1) DEFAULT 0 NOT NULL                   COMMENT '是否删除(0/否1/是)',
+    PRIMARY KEY (GKEY)
+);

+ 0 - 29
src/main/java/com/ecnu/platform/controller/TestController.java

@@ -1,29 +0,0 @@
-package com.ecnu.platform.controller;
-
-import com.ecnu.platform.mapper.UserMapper;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @Description:
- * @Auther: phq
- * @Date: 2024/04/20/19:44
- */
-
-@RestController
-@RequestMapping("/test")
-@Slf4j
-public class TestController {
-
-    @Autowired
-    UserMapper userMapper;
-
-    @RequestMapping(value = "/getAllUsers",method = RequestMethod.POST)
-    public Object queryAllUsers(){
-        log.info("query users----");
-        return userMapper.getAllUser();
-    }
-}

+ 0 - 29
src/main/java/com/ecnu/platform/entity/User.java

@@ -1,29 +0,0 @@
-package com.ecnu.platform.entity;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serial;
-import java.io.Serializable;
-
-/**
- * @Description:
- * @Auther: phq
- * @Date: 2024/02/05/06:42
- */
-
-//pojo
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class User implements Serializable {
-
-    @Serial
-    private static final long serialVersionUID = 4758543875414932163L;
-    private String name;
-    private Integer age;
-
-}

+ 0 - 22
src/main/java/com/ecnu/platform/mapper/UserMapper.java

@@ -1,22 +0,0 @@
-package com.ecnu.platform.mapper;
-
-import com.ecnu.platform.entity.User;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Select;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * @Description:
- * @Auther: phq
- * @Date: 2024/02/05/06:50
- */
-
-@Mapper
-@Component
-public interface UserMapper {
-    @Select("select * from user")
-    List<User> getAllUser();
-
-}

+ 54 - 0
src/main/java/com/ecnu/platform/service/AlgDefinitionService.groovy

@@ -0,0 +1,54 @@
+package com.ecnu.platform.service
+
+import com.three.common.vo.SelectOption
+import com.three.data_api.dm.annos.BizApiMethod
+import com.three.data_api.dm.constants.ThreeConstant
+import com.three.data_api.dm.entity.AuqResult
+import com.three.data_api.service.impl.BaseEntityServiceImpl
+
+class AlgDefinitionService extends BaseEntityServiceImpl {
+
+    private static final String EN_AlgDefinition = "AlgDefinition"
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询实体ID")
+    String getEntityId(Map<String, Object> map) {
+        return EN_AlgDefinition;
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询算法定义")
+    AuqResult query(Map<String, Object> map) throws Exception {
+        return super.query(map)
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询算法定义下拉框")
+    List<SelectOption> getSelectOptions(Map<String, Object> map) throws Exception {
+        return super.getSelectOptions(map)
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "新增算法定义")
+    void create(Map<String, Object> map) throws Exception {
+        super.create(map)
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "修改算法定义")
+    void update(Map<String, Object> map) throws Exception {
+        super.update(map)
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "删除算法定义")
+    void delete(Map<String, Object> map) throws Exception {
+        super.delete(map)
+    }
+
+    @Override
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "恢复算法定义")
+    void recover(Map<String, Object> map) throws Exception {
+        super.recover(map)
+    }
+}

+ 21 - 9
src/main/resources/application.yml

@@ -1,11 +1,23 @@
-server:
-  port: 2001
-
 spring:
   application:
-    name: smart-port-platform
-  datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    username: ap
-    password: ap
-    url: jdbc:mysql://yuerantec.com:2603/algplat
+    name: auth-server
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 127.0.0.1:8848
+      gateway:
+        discovery:
+          locator:
+            enabled: true
+server:
+  port: 8083
+  servlet:
+    context-path: /auth-server
+
+#mqtt,rabbitmq 是否启用
+#message:
+#  type:
+#    #rabbitDirectSender,mqttSender 选择
+#    name: mqttSender
+#    #服务端互相发送mq 只支持rabbitDirectSender
+#    serve-rabbitmq: false

+ 200 - 0
src/main/resources/logback-spring.xml

@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
+<!-- scan:当此属性设置为true时,配置文档如果发生改变,将会被重新加载,默认值为true -->
+<!-- scanPeriod:设置监测配置文档是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。
+                 当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
+<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
+<configuration scan="true" scanPeriod="10 seconds">
+    <contextName>logback</contextName>
+
+    <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
+    <property name="log.path" value="./logs"/>
+    <property name="file.name" value="three"/>
+
+    <!--0. 日志格式和颜色渲染 -->
+    <!-- 彩色日志依赖的渲染类 -->
+    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+    <conversionRule conversionWord="wex"
+                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
+    <conversionRule conversionWord="wEx"
+                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
+    <!-- 彩色日志格式 -->
+    <property name="CONSOLE_LOG_PATTERN"
+              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
+
+    <!--1. 输出到控制台-->
+    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+        <!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>debug</level>
+        </filter>
+        <encoder>
+            <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
+            <!-- 设置字符集 -->
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+    <!--2. 输出到文档-->
+    <!-- 2.1 level为 DEBUG 日志,时间滚动输出  -->
+    <appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文档的路径及文档名 -->
+        <file>${log.path}/${file.name}-debug.log</file>
+        <!--日志文档输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志归档 -->
+            <fileNamePattern>${log.path}/${file.name}-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文档保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文档只记录debug级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>debug</level>
+            <!--            <onMatch>ACCEPT</onMatch>-->
+            <!--            <onMismatch>DENY</onMismatch>-->
+        </filter>
+    </appender>
+
+    <!-- 2.2 level为 INFO 日志,时间滚动输出  -->
+    <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文档的路径及文档名 -->
+        <file>${log.path}/${file.name}-info.log</file>
+        <!--日志文档输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 每天日志归档路径以及格式 -->
+            <fileNamePattern>${log.path}/${file.name}-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文档保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文档只记录info级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>info</level>
+            <!--            <onMatch>ACCEPT</onMatch>-->
+            <!--            <onMismatch>DENY</onMismatch>-->
+        </filter>
+    </appender>
+
+    <!-- 2.3 level为 WARN 日志,时间滚动输出  -->
+    <appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文档的路径及文档名 -->
+        <file>${log.path}/${file.name}-warn.log</file>
+        <!--日志文档输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/${file.name}-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文档保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文档只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>warn</level>
+            <!--            <onMatch>ACCEPT</onMatch>-->
+            <!--            <onMismatch>DENY</onMismatch>-->
+        </filter>
+    </appender>
+
+    <!-- 2.4 level为 ERROR 日志,时间滚动输出  -->
+    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文档的路径及文档名 -->
+        <file>${log.path}/${file.name}-error.log</file>
+        <!--日志文档输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/${file.name}-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文档保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文档只记录ERROR级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <!--            <onMatch>ACCEPT</onMatch>-->
+            <!--            <onMismatch>DENY</onMismatch>-->
+        </filter>
+    </appender>
+
+    <!--
+        <logger>用来设置某一个包或者具体的某一个类的日志打印级别、
+        以及指定<appender>。<logger>仅有一个name属性,
+        一个可选的level和一个可选的addtivity属性。
+        name:用来指定受此logger约束的某一个包或者具体的某一个类。
+        level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+              还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
+              如果未设置此属性,那么当前logger将会继承上级的级别。
+        addtivity:是否向上级logger传递打印信息。默认是true。
+        <logger name="org.springframework.web" level="info"/>
+        <logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>
+    -->
+
+    <!--
+        使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
+        第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
+        第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
+        【logging.level.org.mybatis=debug logging.level.dao=debug】
+     -->
+
+    <!--
+        root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
+        level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+        不能设置为INHERITED或者同义词NULL。默认是DEBUG
+        可以包含零个或多个元素,标识这个appender将会添加到这个logger。
+    -->
+
+    <!-- 4. 最终的策略 -->
+    <!-- 4.1 开发环境:打印控制台-->
+    <!--    <springProfile name="dev">-->
+    <!--        <logger name="com.sdcm.pmp" level="debug"/>-->
+    <!--    </springProfile>-->
+
+    <logger name="org.springframework" level="INFO"/>
+    <logger name="com.three" level="INFO"/>
+
+    <root level="INFO">
+        <appender-ref ref="CONSOLE"/>
+        <!--        <appender-ref ref="DEBUG_FILE" />-->
+        <!--        <appender-ref ref="INFO_FILE" />-->
+        <!--        <appender-ref ref="WARN_FILE" />-->
+        <!--        <appender-ref ref="ERROR_FILE" />-->
+    </root>
+
+    <!-- 4.2 生产环境:输出到文档
+    <springProfile name="pro">
+        <root level="info">
+            <appender-ref ref="CONSOLE" />
+            <appender-ref ref="DEBUG_FILE" />
+            <appender-ref ref="INFO_FILE" />
+            <appender-ref ref="ERROR_FILE" />
+            <appender-ref ref="WARN_FILE" />
+        </root>
+    </springProfile> -->
+
+</configuration>

+ 4 - 0
src/main/resources/three-dataApi.properties

@@ -0,0 +1,4 @@
+# dataApi properties
+three.dataApi.multiDataSource=true
+# mybatis properties
+three.dataApi.mapping=${user.dir}/mybatis/mapping

+ 53 - 0
src/main/resources/three-druid.properties

@@ -0,0 +1,53 @@
+three.druid.driver-class-name=com.mysql.cj.jdbc.Driver
+three.druid.url=jdbc:mysql://lekoxnfx.com:43306/app-test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+three.druid.username=app-test
+three.druid.password=app-test
+three.druid.type=com.alibaba.druid.pool.DruidDataSource
+# 初始化连接大小
+three.druid.initialSize=1
+# 最小连接池数量
+three.druid.minIdle=3
+# 最大连接池数量
+three.druid.maxActive=20
+# 获取连接时最大等待时间,单位毫秒
+three.druid.maxWait=60000
+# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+three.druid.timeBetweenEvictionRunsMillis=60000
+# 配置一个连接在池中最小生存的时间,单位是毫秒
+three.druid.minEvictableIdleTimeMillis=30000
+# 配置一个连接在池中最大生存的时间,单位是毫秒
+three.druid.maxEvictableIdleTimeMillis=300000
+# 测试连接
+three.druid.validationQuery=select 1 from dual
+#
+three.druid.validationQueryTimeout=60
+# 申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
+three.druid.testWhileIdle=true
+# 获取连接时执行检测,建议关闭,影响性能
+three.druid.testOnBorrow=false
+# 归还连接时执行检测,建议关闭,影响性能
+three.druid.testOnReturn=false
+# 是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
+three.druid.poolPreparedStatements=false
+# 开启poolPreparedStatements后生效
+three.druid.maxPoolPreparedStatementPerConnectionSize=20
+# 配置扩展插件,常用的插件有=>stat:监控统计 wall:防御sql注入
+three.druid.filters=stat,slf4j
+# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+three.druid.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+#
+three.druid.keepAlive=true
+#
+three.druid.killWhenSocketReadTimeout=true
+#
+three.druid.queryTimeout=480
+# 是否打开连接泄露自动检测,开启连接池回收
+three.druid.removeAbandoned=true
+# 连接长时间没有使用,被认为发生泄露时长,超时连接回收时间,单位秒
+three.druid.removeAbandonedTimeout=300
+# 回收连接时间打印日志
+three.druid.logAbandoned=true
+# druid监控界面登录账号
+three.druid.loginUsername=three
+# druid监控界面登录密码
+three.druid.loginPassword=three

+ 5 - 0
src/main/resources/three-message.properties

@@ -0,0 +1,5 @@
+three.message.ip=127.0.0.1
+three.message.port=1883
+three.message.websocketPort=1884
+three.message.defaultUserName=csw
+three.message.defaultPassword=csw

+ 31 - 0
src/main/resources/three-redis.properties

@@ -0,0 +1,31 @@
+# 最大空闲连接数 默认8
+three.redis.maxIdle=300
+# 最小空闲连接数 默认0
+three.redis.minIdle=1
+# 控制一个pool可分配多少个jedis实例,用来替换上面的spring.redis.maxActive,如果是jedis 2.4以后用该属性
+three.redis.maxTotal=1000
+# 最大活跃链接数 默认8
+three.redis.maxActive=300
+# 最大建立连接等待时间,如果超过此时间将接到异常,设为-1表示无限制。
+three.redis.maxWaitMillis=1000
+# 连接的最小空闲时间 默认1800000毫秒(30分钟)
+three.redis.minEvictableIdleTimeMillis=300000
+# 每次释放连接的最大数目,默认3
+three.redis.numTestsPerEvictionRun=1024
+# 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
+three.redis.timeBetweenEvictionRunsMillis=30000
+# 是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
+three.redis.testOnBorrow=true
+# 返回性校验
+three.redis.testOnReturn=true
+# 在空闲时检查有效性, 默认false
+three.redis.testWhileIdle=true
+# 节点集群
+#three.redis.clusterNodes=10.21.5.34:7001,10.21.5.34:7002,10.21.5.34:7003,10.21.5.34:7004,10.21.5.34:7005,10.21.5.34:7006
+#three.redis.maxRedirects=1
+# 单机版
+#three.redis.host=127.0.0.1
+#three.redis.port=6379
+three.redis.host=lekoxnfx.com
+three.redis.port=46378
+three.redis.password=xptj8LEG