Browse Source

first commit

GITZYY 2 months ago
commit
e3f4cbe34e
26 changed files with 531 additions and 0 deletions
  1. 36 0
      .gitignore
  2. 33 0
      README.md
  3. 34 0
      egress-gateway-service-adapter/pom.xml
  4. 1 0
      egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/controller/package-info.java
  5. 1 0
      egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/package-info.java
  6. 29 0
      egress-gateway-service-app/pom.xml
  7. 1 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/package-info.java
  8. 24 0
      egress-gateway-service-client/pom.xml
  9. 1 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/package-info.java
  10. 32 0
      egress-gateway-service-domain/pom.xml
  11. 3 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/package-info.java
  12. 46 0
      egress-gateway-service-infrastructure/pom.xml
  13. 1 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/package-info.java
  14. 1 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/entity/package-info.java
  15. 1 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/mapper/package-info.java
  16. 1 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/package-info.java
  17. 1 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/package-info.java
  18. 6 0
      egress-gateway-service-infrastructure/src/main/resources/db/data.sql
  19. 23 0
      egress-gateway-service-infrastructure/src/main/resources/db/schema.sql
  20. 18 0
      egress-gateway-service-infrastructure/src/main/resources/mybatis-config.xml
  21. 107 0
      pom.xml
  22. 25 0
      start/pom.xml
  23. 31 0
      start/src/main/java/com/hrsk/cloud/eg/Application.java
  24. 26 0
      start/src/main/resources/application-local.yaml
  25. 18 0
      start/src/main/resources/application.yaml
  26. 31 0
      start/src/main/resources/logback-spring.xml

+ 36 - 0
.gitignore

@@ -0,0 +1,36 @@
+# maven ignore
+target/
+*.jar
+!.mvn/wrapper/*
+*.war
+*.zip
+*.tar
+*.tar.gz
+
+# eclipse ignore
+.settings/
+.project
+.classpath
+
+# idea ignore
+.idea/
+*.ipr
+*.iml
+*.iws
+
+# temp ignore
+*.log
+*.cache
+*.diff
+*.patch
+*.tmp
+
+# system ignore
+.DS_Store
+Thumbs.db
+*.orig
+*.out
+*.pid
+
+# custom
+mybatis_plus_generator.author

+ 33 - 0
README.md

@@ -0,0 +1,33 @@
+
+# pangu-archetype-sc
+
+maven archetype工程。
+
+## 构建&&安装archetype到本地maven
+
+mvn archetype:create-from-project
+
+cd target/generated-sources/archetype
+
+mvn install
+
+## 使用本地archetype创建工程
+
+mvn archetype:generate -DarchetypeCatalog=local
+
+## 使用本地模式进行开发
+
+在启动环境中添加spring.profiles.active=local
+
+# 如何删除本地archetype
+
+清理 ~/.m2/repository/archetype-catalog.xml
+
+# GIT
+
+1.fix pangu-archetype-web-domain  修改bug
+
+# base_table
+
+
+

+ 34 - 0
egress-gateway-service-adapter/pom.xml

@@ -0,0 +1,34 @@
+<?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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>egress-gateway-service-adapter</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-app</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>

+ 1 - 0
egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/controller/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.adapter.controller;

+ 1 - 0
egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.adapter;

+ 29 - 0
egress-gateway-service-app/pom.xml

@@ -0,0 +1,29 @@
+<?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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>egress-gateway-service-app</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-infrastructure</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-client</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 1 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.app;

+ 24 - 0
egress-gateway-service-client/pom.xml

@@ -0,0 +1,24 @@
+<?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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>egress-gateway-service-client</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.pangu</groupId>
+            <artifactId>pangu-component-dto</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 1 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.client;

+ 32 - 0
egress-gateway-service-domain/pom.xml

@@ -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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>egress-gateway-service-domain</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.pangu</groupId>
+            <artifactId>pangu-component-domain-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hrsk.pangu</groupId>
+            <artifactId>pangu-component-tool</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 3 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/package-info.java

@@ -0,0 +1,3 @@
+package com.hrsk.cloud.eg.domain;
+
+xx

+ 46 - 0
egress-gateway-service-infrastructure/pom.xml

@@ -0,0 +1,46 @@
+<?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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>egress-gateway-service-infrastructure</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-domain</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>

+ 1 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.infrastructure;

+ 1 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/entity/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.infrastructure.repository.database.entity;

+ 1 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/mapper/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.infrastructure.repository.database.mapper;

+ 1 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.infrastructure.repository.database;

+ 1 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/package-info.java

@@ -0,0 +1 @@
+package com.hrsk.cloud.eg.infrastructure.repository;

+ 6 - 0
egress-gateway-service-infrastructure/src/main/resources/db/data.sql

@@ -0,0 +1,6 @@
+/*  本地模式,h2数据库数据初始化脚本 **/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+INSERT INTO `tb_archetype` (`id`, `status`, `create_userid`, `create_username`, `modify_userid`, `modify_username`)
+VALUES (1, 'ok', '10000', 'admin', '10000', 'admin');

+ 23 - 0
egress-gateway-service-infrastructure/src/main/resources/db/schema.sql

@@ -0,0 +1,23 @@
+/* 本地模式,h2数据库表结构初始化脚本**/
+SET NAMES utf8 ;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+SET FOREIGN_KEY_CHECKS=0;
+
+/** 样例原型表 **/
+DROP TABLE IF EXISTS `tb_archetype`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `tb_archetype` (
+    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+    `status` varchar(20) NOT NULL COMMENT '状态:created=已创建,deleted=已删除。',
+    `create_userid` varchar(100) DEFAULT NULL COMMENT '创建人',
+    `create_username` varchar(100) DEFAULT NULL COMMENT '创建用户名',
+    `modify_userid` varchar(100) DEFAULT NULL COMMENT '修改人ID',
+    `modify_username` varchar(100) DEFAULT NULL COMMENT '修改人名称',
+    `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='原型表';

+ 18 - 0
egress-gateway-service-infrastructure/src/main/resources/mybatis-config.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- mybatis的配置文件 -->
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <!-- 开启驼峰映射 ,否则查询结果不能转成resultType-->
+    <settings>
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+    </settings>
+    <typeAliases>
+        <!--项目DataObject对应的包名-->
+        <package name="com.hrsk.cloud.eg.infrastructure.repository.database.entity"/>
+    </typeAliases>
+    <mappers>
+        <!--<mapper resource="mybatis/ExampleMapper.xml"/>-->
+    </mappers>
+</configuration>

+ 107 - 0
pom.xml

@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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>
+
+    <groupId>com.hrsk.cloud</groupId>
+    <artifactId>egress-gateway-service</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <description>惠融数科基于COLA构建的应用骨架</description>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <atlantis-component.version>1.0.0</atlantis-component.version>
+        <spring-boot.version>2.7.6</spring-boot.version>
+        <spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
+        <mybatis-starter.version>2.2.2</mybatis-starter.version>
+        <mybatis-plus.version>3.5.4.1</mybatis-plus.version>
+        <druid-starter.version>1.2.9</druid-starter.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- 应用模块依赖-start -->
+            <dependency>
+                <groupId>com.hrsk.pangu</groupId>
+                <artifactId>start</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.hrsk.cloud</groupId>
+                <artifactId>egress-gateway-service-app</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>com.hrsk.cloud</groupId>
+                <artifactId>egress-gateway-service-adapter</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>com.hrsk.cloud</groupId>
+                <artifactId>egress-gateway-service-client</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>com.hrsk.cloud</groupId>
+                <artifactId>egress-gateway-service-infrastructure</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>com.hrsk.cloud</groupId>
+                <artifactId>egress-gateway-service-domain</artifactId>
+                <version>1.0-SNAPSHOT</version>
+            </dependency>
+            <!-- 应用模块依赖-end -->
+
+            <dependency>
+                <groupId>com.hrsk.pangu</groupId>
+                <artifactId>pangu-component-bom</artifactId>
+                <version>${atlantis-component.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.mybatis.spring.boot</groupId>
+                <artifactId>mybatis-spring-boot-starter</artifactId>
+                <version>${mybatis-starter.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>druid-spring-boot-starter</artifactId>
+                <version>${druid-starter.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+<modules>  <module>start</module>
+    <module>egress-gateway-service-app</module>
+    <module>egress-gateway-service-adapter</module>
+    <module>egress-gateway-service-client</module>
+    <module>egress-gateway-service-infrastructure</module>
+    <module>egress-gateway-service-domain</module>
+  </modules>
+</project>

+ 25 - 0
start/pom.xml

@@ -0,0 +1,25 @@
+<?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.hrsk.cloud</groupId>
+        <artifactId>egress-gateway-service</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>start</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-adapter</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 31 - 0
start/src/main/java/com/hrsk/cloud/eg/Application.java

@@ -0,0 +1,31 @@
+package com.hrsk.cloud.eg;
+
+import lombok.extern.slf4j.Slf4j;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@Slf4j
+@SpringBootApplication
+@MapperScan("com.hrsk.cloud.eg.infrastructure.repository.database.mapper")
+public class Application {
+    /**
+     * main函数
+     * @param args 参数
+     */
+    public static void main(String[] args) {
+        launch(args);
+    }
+
+    /**
+     * 引导方法
+     * @param args 参数
+     */
+    private static void launch(String[] args){
+        log.info("Begin to start Spring Boot Application ......");
+        long startTime = System.currentTimeMillis();
+        SpringApplication.run(Application.class, args);
+        long endTime = System.currentTimeMillis();
+        log.info("Spring Boot Application has been started, Time used: "+ (endTime - startTime) + "ms" );
+    }
+}

+ 26 - 0
start/src/main/resources/application-local.yaml

@@ -0,0 +1,26 @@
+#spring
+spring:
+  sql:
+    init:
+      schema-locations: classpath:db/schema.sql
+      data-locations: classpath:db/data.sql
+      platform: H2
+      encoding: utf-8
+  h2:
+    console:
+      enabled: true
+      settings:
+        web-allow-others: true
+      path: /h2
+  datasource:
+    driver-class-name: org.h2.Driver
+    url: jdbc:h2:mem:atlantis;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=true;INIT=CREATE SCHEMA IF NOT EXISTS atlantis
+    username: sa
+    password:
+    type: com.zaxxer.hikari.HikariDataSource
+    hikari:
+      minimum-idle: 5
+      idle-timeout: 180000
+      auto-commit: true
+      connection-timeout: 30000
+      connection-test-query: select 1

+ 18 - 0
start/src/main/resources/application.yaml

@@ -0,0 +1,18 @@
+#server
+server:
+  port: 8081
+  servlet:
+    context-path: /
+#spring
+spring:
+  application:
+    name: xx-server
+  profiles:
+    active: local
+#mybatis
+mybatis:
+  config-location: classpath:mybatis-config.xml
+#pageHelper
+pagehelper:
+  helper-dialect: mysql
+

+ 31 - 0
start/src/main/resources/logback-spring.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+    <property name="log.path" value="./logs" />
+    <!-- 日志输出格式 -->
+    <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}/sys-info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <root level="info">
+        <appender-ref ref="console" />
+    </root>
+</configuration>