Explorar el Código

:whale: 集成 springboot 环境

渔民小镇 hace 1 año
padre
commit
b87b32fd53

+ 8 - 0
common/common-core/pom.xml

@@ -18,4 +18,12 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
 
+    <dependencies>
+        <dependency>
+            <groupId>com.iohao.game</groupId>
+            <artifactId>bolt-core</artifactId>
+            <version>${ioGame.version}</version>
+        </dependency>
+    </dependencies>
+
 </project>

+ 38 - 0
logic/a-logic-common/.gitignore

@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 56 - 0
logic/a-logic-common/pom.xml

@@ -0,0 +1,56 @@
+<?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.iohao.mmo</groupId>
+        <artifactId>game</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>a-logic-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.iohao.mmo</groupId>
+            <artifactId>common-core</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-mongodb</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.mapstruct/mapstruct -->
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+            <version>${org.mapstruct.version}</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.github.javafaker/javafaker -->
+        <dependency>
+            <groupId>com.github.javafaker</groupId>
+            <artifactId>javafaker</artifactId>
+            <version>${javafaker.version}</version>
+        </dependency>
+
+    </dependencies>
+</project>

+ 38 - 0
logic/a-logic-common/src/main/java/com/iohao/mmo/LogicApplication.java

@@ -0,0 +1,38 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @author 渔民小镇
+ * @date 2023-07-26
+ */
+@Slf4j
+@SpringBootApplication
+public class LogicApplication {
+    public static void main(String[] args) {
+        //
+        SpringApplication.run(LogicApplication.class, args);
+
+        log.info("LogicApplication : {}", args);
+    }
+}

+ 52 - 0
logic/a-logic-common/src/main/java/com/iohao/mmo/config/MongoConfig.java

@@ -0,0 +1,52 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo.config;
+
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoClients;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.mongodb.config.AbstractMongoClientConfiguration;
+import org.springframework.data.mongodb.config.EnableMongoAuditing;
+import org.springframework.data.mongodb.core.MongoTemplate;
+
+/**
+ * @author 渔民小镇
+ * @date 2023-07-26
+ */
+@Configuration
+@EnableMongoAuditing
+public class MongoConfig extends AbstractMongoClientConfiguration {
+
+    @Override
+    protected String getDatabaseName() {
+        return "test";
+    }
+
+    @Override
+    public MongoClient mongoClient() {
+        return MongoClients.create("mongodb://localhost:27017");
+    }
+
+    @Bean
+    public MongoTemplate mongoTemplate() {
+        return new MongoTemplate(mongoClient(), getDatabaseName());
+    }
+}

+ 4 - 2
one-application/src/main/resources/logback.xml → logic/a-logic-common/src/main/resources/logback-spring.xml

@@ -9,10 +9,12 @@
     <property name="log.moduleName" value="game"/>
     <!--日志文件的保存路径,首先查找系统属性-Dlog.dir,如果存在就使用其;否则,在当前目录下创建名为logs目录做日志存放的目录 -->
     <property name="log.base" value="${log.dir:-logs}/${log.moduleName}"/>
-    <property name="log.max.size" value="100MB"/> <!-- 日志文件大小,超过这个大小将被压缩 -->
+    <!-- 日志文件大小,超过这个大小将被压缩 -->
+    <property name="log.max.size" value="100MB"/>
 
     <!-- 彩色日志 -->
-    <property name="log.pattern" value="%cyan(%d{HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %cyan(%method) %cyan(\\(%file:%line\\)) - %msg%n" />
+    <property name="log.pattern"
+              value="%d{HH:mm:ss} %green([%thread]) %highlight(%-5level) %cyan(%logger{50}) %green(\(%file:%line\)) - %msg%n"/>
 
     <!--控制台输出 -->
     <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">

+ 1 - 0
logic/all-logic/pom.xml

@@ -30,6 +30,7 @@
             <artifactId>person-logic</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+
     </dependencies>
 
 </project>

+ 4 - 4
logic/login-logic/pom.xml

@@ -21,16 +21,16 @@
     <dependencies>
         <dependency>
             <groupId>com.iohao.mmo</groupId>
-            <artifactId>login-provide</artifactId>
-            <version>${project.parent.version}</version>
+            <artifactId>a-logic-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
         </dependency>
 
-        <!-- 公共核心模块 -->
         <dependency>
             <groupId>com.iohao.mmo</groupId>
-            <artifactId>common-core</artifactId>
+            <artifactId>login-provide</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+
     </dependencies>
 
 </project>

+ 9 - 4
logic/person-logic/pom.xml

@@ -21,15 +21,20 @@
     <dependencies>
         <dependency>
             <groupId>com.iohao.mmo</groupId>
-            <artifactId>person-provide</artifactId>
-            <version>${project.parent.version}</version>
+            <artifactId>a-logic-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
         </dependency>
 
-        <!-- 公共核心模块 -->
         <dependency>
             <groupId>com.iohao.mmo</groupId>
-            <artifactId>common-core</artifactId>
+            <artifactId>person-provide</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

+ 49 - 0
logic/person-logic/src/main/java/com/iohao/mmo/person/PersonLogicServer.java

@@ -0,0 +1,49 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo.person;
+
+import com.iohao.game.action.skeleton.core.BarSkeleton;
+import com.iohao.game.action.skeleton.core.BarSkeletonBuilder;
+import com.iohao.game.action.skeleton.kit.LogicServerCreateKit;
+import com.iohao.game.bolt.broker.client.AbstractBrokerClientStartup;
+import com.iohao.game.bolt.broker.core.client.BrokerClientBuilder;
+import com.iohao.mmo.common.logic.server.LogicServerKit;
+import com.iohao.mmo.person.action.PersonAction;
+
+/**
+ * @author 渔民小镇
+ * @date 2023-07-26
+ */
+public class PersonLogicServer extends AbstractBrokerClientStartup {
+    @Override
+    public BarSkeleton createBarSkeleton() {
+        // 业务框架构建器
+        BarSkeletonBuilder builder = LogicServerCreateKit
+                .createBuilder(PersonAction.class);
+
+        return builder.build();
+    }
+
+    @Override
+    public BrokerClientBuilder createBrokerClientBuilder() {
+        BrokerClientBuilder builder = LogicServerKit.newBrokerClientBuilder();
+        builder.appName("人物逻辑服");
+        return builder;
+    }
+}

+ 4 - 0
logic/person-logic/src/main/java/com/iohao/mmo/person/entity/PersonBasicPropertyEntity.java

@@ -21,7 +21,9 @@ package com.iohao.mmo.person.entity;
 import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.Setter;
+import lombok.ToString;
 import lombok.experimental.FieldDefaults;
+import org.springframework.data.mongodb.core.mapping.Document;
 
 /**
  * 人物基础属性
@@ -31,6 +33,8 @@ import lombok.experimental.FieldDefaults;
  */
 @Getter
 @Setter
+@Document
+@ToString
 @FieldDefaults(level = AccessLevel.PRIVATE)
 public class PersonBasicPropertyEntity {
     /** 生命值 */

+ 43 - 0
logic/person-logic/src/test/java/com/iohao/mmo/person/entity/PersonEntityTest.java

@@ -0,0 +1,43 @@
+package com.iohao.mmo.person.entity;
+
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+
+import java.util.List;
+
+/**
+ * @author 渔民小镇
+ * @date 2023-07-26
+ */
+@Slf4j
+@SpringBootTest
+public class PersonEntityTest {
+    @Resource
+    MongoTemplate mongoTemplate;
+
+
+    @Test
+    void test1() {
+
+        PersonBasicPropertyEntity person = new PersonBasicPropertyEntity();
+        person.setAnger(1);
+
+//        mongoTemplate.save(person);
+
+
+        Criteria criteria = Criteria.where("anger").is(1);
+        Query query = new Query(criteria);
+
+        List<PersonBasicPropertyEntity> entities = mongoTemplate.find(query, PersonBasicPropertyEntity.class);
+
+        log.info("students : {}", entities.size());
+        for (PersonBasicPropertyEntity person1 : entities) {
+            System.out.println(person1);
+        }
+    }
+}

+ 6 - 0
one-application/pom.xml

@@ -36,6 +36,12 @@
             <artifactId>broker</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>com.iohao.game</groupId>
+            <artifactId>run-one-netty</artifactId>
+            <version>${ioGame.version}</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 9 - 1
one-application/src/main/java/com/iohao/mmo/app/OneApplication.java → one-application/src/main/java/com/iohao/mmo/OneApplication.java

@@ -16,7 +16,7 @@
  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
-package com.iohao.mmo.app;
+package com.iohao.mmo;
 
 import com.iohao.game.bolt.broker.client.AbstractBrokerClientStartup;
 import com.iohao.game.bolt.broker.server.BrokerServer;
@@ -26,7 +26,10 @@ import com.iohao.game.external.core.netty.simple.NettyRunOne;
 import com.iohao.mmo.broker.MyBrokerServer;
 import com.iohao.mmo.external.MyExternalServer;
 import com.iohao.mmo.login.LoginLogicServer;
+import com.iohao.mmo.person.PersonLogicServer;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 import java.util.List;
 
@@ -35,8 +38,10 @@ import java.util.List;
  * @date 2023-07-21
  */
 @Slf4j
+@SpringBootApplication
 public class OneApplication {
     public static void main(String[] args) {
+        SpringApplication.run(OneApplication.class, args);
 
         // 游戏逻辑服列表
         List<AbstractBrokerClientStartup> logicServers = listLogic();
@@ -61,11 +66,14 @@ public class OneApplication {
 
     private static List<AbstractBrokerClientStartup> listLogic() {
         LoginLogicServer loginLogicServer = new LoginLogicServer();
+        PersonLogicServer personLogicServer = new PersonLogicServer();
 
         // 游戏逻辑服列表
         return List.of(
                 // 登录
                 loginLogicServer
+                // 人物
+                , personLogicServer
         );
     }
 }

+ 17 - 0
one-client/pom.xml

@@ -16,6 +16,11 @@
         <maven.compiler.source>17</maven.compiler.source>
         <maven.compiler.target>17</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <!-- slf4j https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
+        <slf4j-api.version>1.7.36</slf4j-api.version>
+        <!-- slf4j https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
+        <logback.version>1.2.11</logback.version>
+
     </properties>
 
     <dependencies>
@@ -25,6 +30,18 @@
             <version>${project.parent.version}</version>
         </dependency>
 
+        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j-api.version}</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
 
     </dependencies>
 

+ 0 - 2
one-client/src/main/java/com/iohao/mmo/client/CommonClient.java

@@ -53,6 +53,4 @@ public class CommonClient {
                 .setInputCommandRegions(inputCommandRegions)
                 .startup();
     }
-
-
 }

+ 91 - 137
pom.xml

@@ -3,7 +3,12 @@
          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>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>3.1.2</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
     <groupId>com.iohao.mmo</groupId>
     <artifactId>game</artifactId>
     <version>1.0-SNAPSHOT</version>
@@ -19,7 +24,7 @@
         <module>one-application</module>
         <module>one-client</module>
 
-
+        <module>logic/a-logic-common</module>
         <module>logic/all-logic</module>
         <!-- 游戏逻辑服 - 登录 -->
         <module>logic/login-logic</module>
@@ -43,7 +48,8 @@
         <encoding>UTF-8</encoding>
 
         <!-- 项目版本 -->
-        <ioGame.version>17.1.47</ioGame.version>
+        <ioGame.version>17.1.48</ioGame.version>
+        <spring-boot.version>3.1.2</spring-boot.version>
         <!-- lombok 消除冗长的 Java 代码 https://mvnrepository.com/artifact/org.projectlombok/lombok -->
         <lombok.version>1.18.24</lombok.version>
         <!-- redis internal : https://mvnrepository.com/artifact/org.redisson/redisson -->
@@ -63,148 +69,96 @@
         <junit.version>4.13.2</junit.version>
         <!-- 演示用的假数据 https://mvnrepository.com/artifact/com.github.javafaker/javafaker -->
         <javafaker.version>1.0.2</javafaker.version>
-
-        <!-- slf4j https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
-        <slf4j-api.version>1.7.36</slf4j-api.version>
-        <!-- slf4j https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
-        <logback.version>1.2.11</logback.version>
-
     </properties>
 
     <dependencies>
-        <!-- 单体应用启动 -->
-        <dependency>
-            <groupId>com.iohao.game</groupId>
-            <artifactId>run-one-netty</artifactId>
-            <version>${ioGame.version}</version>
-        </dependency>
-
-
-
-        <!-- https://mvnrepository.com/artifact/com.github.javafaker/javafaker -->
-        <dependency>
-            <groupId>com.github.javafaker</groupId>
-            <artifactId>javafaker</artifactId>
-            <version>1.0.2</version>
-        </dependency>
-
-        <!-- lombok 简化 java 代码 -->
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>${lombok.version}</version>
             <optional>true</optional>
         </dependency>
-
-        <!-- https://mvnrepository.com/artifact/org.mapstruct/mapstruct -->
-        <dependency>
-            <groupId>org.mapstruct</groupId>
-            <artifactId>mapstruct</artifactId>
-            <version>${org.mapstruct.version}</version>
-        </dependency>
-
-        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>${slf4j-api.version}</version>
-        </dependency>
-        <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>${logback.version}</version>
-        </dependency>
-
-        <!-- https://mvnrepository.com/artifact/junit/junit -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>compile</scope>
-        </dependency>
     </dependencies>
-    <build>
-        <plugins>
-            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-clean-plugin</artifactId>
-                <version>3.1.0</version>
-            </plugin>
-
-            <!--
-            编译插件
-            mvn compile
-            To compile your test sources, you'll do:
-            mvn test-compile
-            -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
-                <configuration>
-                    <compilerVersion>${java.version}</compilerVersion>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                    <!-- maven 3.6.2及之后加上编译参数,可以让我们在运行期获取方法参数名称。 -->
-                    <parameters>true</parameters>
-                    <skip>true</skip>
-                    <!-- JDK9+ with module-info.java -->
-                    <annotationProcessorPaths>
-                        <!-- 实体映射工具 -->
-                        <path>
-                            <groupId>org.mapstruct</groupId>
-                            <artifactId>mapstruct-processor</artifactId>
-                            <version>${org.mapstruct.version}</version>
-                        </path>
-
-                        <!-- lombok 消除冗长的 Java 代码 -->
-                        <path>
-                            <groupId>org.projectlombok</groupId>
-                            <artifactId>lombok</artifactId>
-                            <version>${lombok.version}</version>
-                        </path>
-                        <!-- additional annotation processor required as of Lombok 1.18.16 -->
-                        <!-- mapStruct 支持 lombok -->
-                        <path>
-                            <groupId>org.projectlombok</groupId>
-                            <artifactId>lombok-mapstruct-binding</artifactId>
-                            <version>0.2.0</version>
-                        </path>
-                    </annotationProcessorPaths>
-                </configuration>
-            </plugin>
-
-            <!-- 打包时跳过单元测试 https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>3.0.0-M5</version>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
-            </plugin>
-
-            <!-- 打包源码 https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>3.2.1</version>
-                <configuration>
-                    <attach>true</attach>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-    </build>
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            &lt;!&ndash; https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin &ndash;&gt;-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-clean-plugin</artifactId>-->
+<!--                <version>3.1.0</version>-->
+<!--            </plugin>-->
+
+<!--            &lt;!&ndash;-->
+<!--            编译插件-->
+<!--            mvn compile-->
+<!--            To compile your test sources, you'll do:-->
+<!--            mvn test-compile-->
+<!--            &ndash;&gt;-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-compiler-plugin</artifactId>-->
+<!--                <version>3.8.1</version>-->
+<!--                <configuration>-->
+<!--                    <compilerVersion>${java.version}</compilerVersion>-->
+<!--                    <source>${java.version}</source>-->
+<!--                    <target>${java.version}</target>-->
+<!--                    &lt;!&ndash; maven 3.6.2及之后加上编译参数,可以让我们在运行期获取方法参数名称。 &ndash;&gt;-->
+<!--                    <parameters>true</parameters>-->
+<!--                    <skip>true</skip>-->
+<!--                    &lt;!&ndash; JDK9+ with module-info.java &ndash;&gt;-->
+<!--                    <annotationProcessorPaths>-->
+<!--                        &lt;!&ndash; 实体映射工具 &ndash;&gt;-->
+<!--                        <path>-->
+<!--                            <groupId>org.mapstruct</groupId>-->
+<!--                            <artifactId>mapstruct-processor</artifactId>-->
+<!--                            <version>${org.mapstruct.version}</version>-->
+<!--                        </path>-->
+
+<!--                        &lt;!&ndash; lombok 消除冗长的 Java 代码 &ndash;&gt;-->
+<!--                        <path>-->
+<!--                            <groupId>org.projectlombok</groupId>-->
+<!--                            <artifactId>lombok</artifactId>-->
+<!--                            <version>${lombok.version}</version>-->
+<!--                        </path>-->
+<!--                        &lt;!&ndash; additional annotation processor required as of Lombok 1.18.16 &ndash;&gt;-->
+<!--                        &lt;!&ndash; mapStruct 支持 lombok &ndash;&gt;-->
+<!--                        <path>-->
+<!--                            <groupId>org.projectlombok</groupId>-->
+<!--                            <artifactId>lombok-mapstruct-binding</artifactId>-->
+<!--                            <version>0.2.0</version>-->
+<!--                        </path>-->
+<!--                    </annotationProcessorPaths>-->
+<!--                </configuration>-->
+<!--            </plugin>-->
+
+<!--            &lt;!&ndash; 打包时跳过单元测试 https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin &ndash;&gt;-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-surefire-plugin</artifactId>-->
+<!--                <version>3.0.0-M5</version>-->
+<!--                <configuration>-->
+<!--                    <skipTests>true</skipTests>-->
+<!--                </configuration>-->
+<!--            </plugin>-->
+
+<!--            &lt;!&ndash; 打包源码 https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin &ndash;&gt;-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-source-plugin</artifactId>-->
+<!--                <version>3.2.1</version>-->
+<!--                <configuration>-->
+<!--                    <attach>true</attach>-->
+<!--                </configuration>-->
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <phase>compile</phase>-->
+<!--                        <goals>-->
+<!--                            <goal>jar</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+<!--            </plugin>-->
+
+<!--        </plugins>-->
+<!--    </build>-->
 
 </project>