mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	重构:按功能初步拆分模块
This commit is contained in:
		
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							@@ -15,6 +15,19 @@ ContiNew-Admin (incubating) 中后台管理框架,Continue New Admin,持续
 | 
				
			|||||||
| [Undertow](https://undertow.io/)                      | 2.2.20.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 |
 | 
					| [Undertow](https://undertow.io/)                      | 2.2.20.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 |
 | 
				
			||||||
| [Lombok](https://projectlombok.org/)                  | 1.18.24      | 在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁。 |
 | 
					| [Lombok](https://projectlombok.org/)                  | 1.18.24      | 在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁。 |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 项目结构
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					采用按功能拆分模块的开发方式,项目结构如下:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> 项目结构按模块的层次顺序介绍,实际 IDE 中 `continew-admin-common` 模块会因为字母排序原因排在上方
 | 
				
			||||||
 | 
					>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					continew-admin  全局通用项目配置及依赖版本管理
 | 
				
			||||||
 | 
					  ├─continew-admin-webapi  API 模块(存放 Controller 层代码,打包部署的模块)
 | 
				
			||||||
 | 
					  ├─continew-admin-system  系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等)
 | 
				
			||||||
 | 
					  ├─continew-admin-common  公共模块(存放公共工具类,公共配置等)
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### License
 | 
					### License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										62
									
								
								continew-admin-common/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								continew-admin-common/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<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>top.charles7c</groupId>
 | 
				
			||||||
 | 
					        <artifactId>continew-admin</artifactId>
 | 
				
			||||||
 | 
					        <version>${revision}</version>
 | 
				
			||||||
 | 
					    </parent>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <artifactId>continew-admin-common</artifactId>
 | 
				
			||||||
 | 
					    <packaging>jar</packaging>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <name>${project.artifactId}</name>
 | 
				
			||||||
 | 
					    <description>公共模块(存放公共工具类,公共配置等)</description>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <dependencies>
 | 
				
			||||||
 | 
					        <!-- ################ Spring Boot 相关 ################ -->
 | 
				
			||||||
 | 
					        <!-- Spring Boot Web(提供 Spring MVC Web 开发能力,默认内置 Tomcat 服务器) -->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					            <artifactId>spring-boot-starter-web</artifactId>
 | 
				
			||||||
 | 
					            <!-- 移除内置 Tomcat 服务器 -->
 | 
				
			||||||
 | 
					            <exclusions>
 | 
				
			||||||
 | 
					                <exclusion>
 | 
				
			||||||
 | 
					                    <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					                    <artifactId>spring-boot-starter-tomcat</artifactId>
 | 
				
			||||||
 | 
					                </exclusion>
 | 
				
			||||||
 | 
					            </exclusions>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <!-- Undertow 服务器(采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制) -->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					            <artifactId>spring-boot-starter-undertow</artifactId>
 | 
				
			||||||
 | 
					            <!-- 移除 websocket 依赖,后续使用 websocket 可考虑由 Netty 提供。另可解决日志警告:UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used -->
 | 
				
			||||||
 | 
					            <exclusions>
 | 
				
			||||||
 | 
					                <exclusion>
 | 
				
			||||||
 | 
					                    <groupId>io.undertow</groupId>
 | 
				
			||||||
 | 
					                    <artifactId>undertow-websockets-jsr</artifactId>
 | 
				
			||||||
 | 
					                </exclusion>
 | 
				
			||||||
 | 
					            </exclusions>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										41
									
								
								continew-admin-system/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								continew-admin-system/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<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>top.charles7c</groupId>
 | 
				
			||||||
 | 
					        <artifactId>continew-admin</artifactId>
 | 
				
			||||||
 | 
					        <version>${revision}</version>
 | 
				
			||||||
 | 
					    </parent>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <artifactId>continew-admin-system</artifactId>
 | 
				
			||||||
 | 
					    <packaging>jar</packaging>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <name>${project.artifactId}</name>
 | 
				
			||||||
 | 
					    <description>系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等)</description>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <dependencies>
 | 
				
			||||||
 | 
					        <!-- 公共模块(存放公共工具类,公共配置等) -->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>top.charles7c</groupId>
 | 
				
			||||||
 | 
					            <artifactId>continew-admin-common</artifactId>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										87
									
								
								continew-admin-webapi/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								continew-admin-webapi/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<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>top.charles7c</groupId>
 | 
				
			||||||
 | 
					        <artifactId>continew-admin</artifactId>
 | 
				
			||||||
 | 
					        <version>${revision}</version>
 | 
				
			||||||
 | 
					    </parent>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <artifactId>continew-admin-webapi</artifactId>
 | 
				
			||||||
 | 
					    <packaging>jar</packaging>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <name>${project.artifactId}</name>
 | 
				
			||||||
 | 
					    <description>API 模块(存放 Controller 层代码,打包部署的模块)</description>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <dependencies>
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					            <artifactId>spring-boot-starter-test</artifactId>
 | 
				
			||||||
 | 
					            <scope>test</scope>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <!-- 系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等) -->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>top.charles7c</groupId>
 | 
				
			||||||
 | 
					            <artifactId>continew-admin-system</artifactId>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <build>
 | 
				
			||||||
 | 
					        <!-- 设置构建的 jar 包名 -->
 | 
				
			||||||
 | 
					        <finalName>${project.parent.name}</finalName>
 | 
				
			||||||
 | 
					        <plugins>
 | 
				
			||||||
 | 
					            <!-- 单元测试配置插件 -->
 | 
				
			||||||
 | 
					            <plugin>
 | 
				
			||||||
 | 
					                <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
 | 
					                <artifactId>maven-surefire-plugin</artifactId>
 | 
				
			||||||
 | 
					                <configuration>
 | 
				
			||||||
 | 
					                    <argLine>-Dfile.encoding=UTF-8</argLine>
 | 
				
			||||||
 | 
					                    <!-- 根据启用环境执行对应 @Tag 的测试方法 -->
 | 
				
			||||||
 | 
					                    <groups>${profiles.active}</groups>
 | 
				
			||||||
 | 
					                    <!-- 排除标签 -->
 | 
				
			||||||
 | 
					                    <excludedGroups>exclude</excludedGroups>
 | 
				
			||||||
 | 
					                </configuration>
 | 
				
			||||||
 | 
					            </plugin>
 | 
				
			||||||
 | 
					            <plugin>
 | 
				
			||||||
 | 
					                <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					                <artifactId>spring-boot-maven-plugin</artifactId>
 | 
				
			||||||
 | 
					                <executions>
 | 
				
			||||||
 | 
					                    <execution>
 | 
				
			||||||
 | 
					                        <goals>
 | 
				
			||||||
 | 
					                            <goal>repackage</goal>
 | 
				
			||||||
 | 
					                        </goals>
 | 
				
			||||||
 | 
					                    </execution>
 | 
				
			||||||
 | 
					                </executions>
 | 
				
			||||||
 | 
					                <configuration>
 | 
				
			||||||
 | 
					                    <!-- 如果没有该项配置,devtools 不会生效,应用不会自动重启 -->
 | 
				
			||||||
 | 
					                    <fork>true</fork>
 | 
				
			||||||
 | 
					                    <excludes>
 | 
				
			||||||
 | 
					                        <exclude>
 | 
				
			||||||
 | 
					                            <groupId>org.projectlombok</groupId>
 | 
				
			||||||
 | 
					                            <artifactId>lombok</artifactId>
 | 
				
			||||||
 | 
					                        </exclude>
 | 
				
			||||||
 | 
					                    </excludes>
 | 
				
			||||||
 | 
					                </configuration>
 | 
				
			||||||
 | 
					            </plugin>
 | 
				
			||||||
 | 
					        </plugins>
 | 
				
			||||||
 | 
					    </build>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
@@ -7,7 +7,7 @@ continew-admin:
 | 
				
			|||||||
  # 版本
 | 
					  # 版本
 | 
				
			||||||
  version: @project.version@
 | 
					  version: @project.version@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--- ### 日志配置
 | 
					--- ### 日志配置(重叠部分,优先级高于 logback-spring.xml 中的配置)
 | 
				
			||||||
logging:
 | 
					logging:
 | 
				
			||||||
  level:
 | 
					  level:
 | 
				
			||||||
    top.charles7c: @logging.level@
 | 
					    top.charles7c: @logging.level@
 | 
				
			||||||
@@ -55,6 +55,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <!-- 开发环境:只打印到控制台 -->
 | 
					    <!-- 开发环境:只打印到控制台 -->
 | 
				
			||||||
    <springProfile name="dev">
 | 
					    <springProfile name="dev">
 | 
				
			||||||
 | 
					        <!-- 如果配置的日志等级,和 application.yml 中的日志等级配置重叠,application.yml 配置优先级高 -->
 | 
				
			||||||
        <root level="INFO">
 | 
					        <root level="INFO">
 | 
				
			||||||
            <appender-ref ref="CONSOLE"/>
 | 
					            <appender-ref ref="CONSOLE"/>
 | 
				
			||||||
        </root>
 | 
					        </root>
 | 
				
			||||||
@@ -63,6 +64,7 @@
 | 
				
			|||||||
    <!-- 生产环境:只输出到文件 -->
 | 
					    <!-- 生产环境:只输出到文件 -->
 | 
				
			||||||
    <springProfile name="prod">
 | 
					    <springProfile name="prod">
 | 
				
			||||||
        <root level="INFO">
 | 
					        <root level="INFO">
 | 
				
			||||||
 | 
					            <appender-ref ref="CONSOLE"/>
 | 
				
			||||||
            <appender-ref ref="ASYNC_FILE"/>
 | 
					            <appender-ref ref="ASYNC_FILE"/>
 | 
				
			||||||
        </root>
 | 
					        </root>
 | 
				
			||||||
    </springProfile>
 | 
					    </springProfile>
 | 
				
			||||||
							
								
								
									
										137
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										137
									
								
								pom.xml
									
									
									
									
									
								
							@@ -19,6 +19,21 @@ limitations under the License.
 | 
				
			|||||||
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
					         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>
 | 
					    <modelVersion>4.0.0</modelVersion>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <groupId>top.charles7c</groupId>
 | 
				
			||||||
 | 
					    <artifactId>continew-admin</artifactId>
 | 
				
			||||||
 | 
					    <version>${revision}</version>
 | 
				
			||||||
 | 
					    <packaging>pom</packaging>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <name>${project.artifactId}</name>
 | 
				
			||||||
 | 
					    <description>ContiNew-Admin (incubating) 中后台管理框架,Continue New Admin,持续以最新流行技术栈构建。</description>
 | 
				
			||||||
 | 
					    <url>https://github.com/Charles7c/continew-admin</url>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <modules>
 | 
				
			||||||
 | 
					        <module>continew-admin-webapi</module>
 | 
				
			||||||
 | 
					        <module>continew-admin-system</module>
 | 
				
			||||||
 | 
					        <module>continew-admin-common</module>
 | 
				
			||||||
 | 
					    </modules>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <parent>
 | 
					    <parent>
 | 
				
			||||||
        <groupId>org.springframework.boot</groupId>
 | 
					        <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
        <artifactId>spring-boot-starter-parent</artifactId>
 | 
					        <artifactId>spring-boot-starter-parent</artifactId>
 | 
				
			||||||
@@ -26,16 +41,9 @@ limitations under the License.
 | 
				
			|||||||
        <relativePath/> <!-- lookup parent from repository -->
 | 
					        <relativePath/> <!-- lookup parent from repository -->
 | 
				
			||||||
    </parent>
 | 
					    </parent>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <groupId>top.charles7c</groupId>
 | 
					 | 
				
			||||||
    <artifactId>continew-admin</artifactId>
 | 
					 | 
				
			||||||
    <version>0.0.1-SNAPSHOT</version>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <name>${project.artifactId}</name>
 | 
					 | 
				
			||||||
    <description>ContiNew-Admin (incubating) 中后台管理框架,Continue New Admin,持续以最新流行技术栈构建。</description>
 | 
					 | 
				
			||||||
    <url>https://github.com/Charles7c/continew-admin</url>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <properties>
 | 
					    <properties>
 | 
				
			||||||
        <!-- ### 基础环境相关 ### -->
 | 
					        <!-- ### 基础环境相关 ### -->
 | 
				
			||||||
 | 
					        <revision>0.0.1-SNAPSHOT</revision>
 | 
				
			||||||
        <java.version>1.8</java.version>
 | 
					        <java.version>1.8</java.version>
 | 
				
			||||||
        <spotless.version>2.28.0</spotless.version>
 | 
					        <spotless.version>2.28.0</spotless.version>
 | 
				
			||||||
        <maven.compiler.source>8</maven.compiler.source>
 | 
					        <maven.compiler.source>8</maven.compiler.source>
 | 
				
			||||||
@@ -43,34 +51,34 @@ limitations under the License.
 | 
				
			|||||||
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
					        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
				
			||||||
    </properties>
 | 
					    </properties>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 全局依赖版本管理 -->
 | 
				
			||||||
 | 
					    <dependencyManagement>
 | 
				
			||||||
        <dependencies>
 | 
					        <dependencies>
 | 
				
			||||||
        <!-- ################ Spring Boot 相关 ################ -->
 | 
					            <!-- ################ 本项目子模块相关 ################ -->
 | 
				
			||||||
        <!-- Spring Boot Web(提供 Spring MVC Web 开发能力,默认内置 Tomcat 服务器) -->
 | 
					            <!-- API 模块(存放 Controller 层代码,打包部署的模块) -->
 | 
				
			||||||
            <dependency>
 | 
					            <dependency>
 | 
				
			||||||
            <groupId>org.springframework.boot</groupId>
 | 
					                <groupId>top.charles7c</groupId>
 | 
				
			||||||
            <artifactId>spring-boot-starter-web</artifactId>
 | 
					                <artifactId>continew-admin-webapi</artifactId>
 | 
				
			||||||
            <!-- 移除内置 Tomcat 服务器 -->
 | 
					                <version>${project.version}</version>
 | 
				
			||||||
            <exclusions>
 | 
					 | 
				
			||||||
                <exclusion>
 | 
					 | 
				
			||||||
                    <groupId>org.springframework.boot</groupId>
 | 
					 | 
				
			||||||
                    <artifactId>spring-boot-starter-tomcat</artifactId>
 | 
					 | 
				
			||||||
                </exclusion>
 | 
					 | 
				
			||||||
            </exclusions>
 | 
					 | 
				
			||||||
            </dependency>
 | 
					            </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- Undertow 服务器(采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制) -->
 | 
					            <!-- 系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等) -->
 | 
				
			||||||
            <dependency>
 | 
					            <dependency>
 | 
				
			||||||
            <groupId>org.springframework.boot</groupId>
 | 
					                <groupId>top.charles7c</groupId>
 | 
				
			||||||
            <artifactId>spring-boot-starter-undertow</artifactId>
 | 
					                <artifactId>continew-admin-system</artifactId>
 | 
				
			||||||
            <!-- 移除 websocket 依赖,后续使用 websocket 可考虑由 Netty 提供。另可解决日志警告:UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used -->
 | 
					                <version>${project.version}</version>
 | 
				
			||||||
            <exclusions>
 | 
					 | 
				
			||||||
                <exclusion>
 | 
					 | 
				
			||||||
                    <groupId>io.undertow</groupId>
 | 
					 | 
				
			||||||
                    <artifactId>undertow-websockets-jsr</artifactId>
 | 
					 | 
				
			||||||
                </exclusion>
 | 
					 | 
				
			||||||
            </exclusions>
 | 
					 | 
				
			||||||
            </dependency>
 | 
					            </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <!-- 公共模块(存放公共工具类,公共配置等) -->
 | 
				
			||||||
 | 
					            <dependency>
 | 
				
			||||||
 | 
					                <groupId>top.charles7c</groupId>
 | 
				
			||||||
 | 
					                <artifactId>continew-admin-common</artifactId>
 | 
				
			||||||
 | 
					                <version>${project.version}</version>
 | 
				
			||||||
 | 
					            </dependency>
 | 
				
			||||||
 | 
					        </dependencies>
 | 
				
			||||||
 | 
					    </dependencyManagement>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <dependencies>
 | 
				
			||||||
        <dependency>
 | 
					        <dependency>
 | 
				
			||||||
            <groupId>org.springframework.boot</groupId>
 | 
					            <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
            <artifactId>spring-boot-devtools</artifactId>
 | 
					            <artifactId>spring-boot-devtools</artifactId>
 | 
				
			||||||
@@ -84,12 +92,6 @@ limitations under the License.
 | 
				
			|||||||
            <optional>true</optional>
 | 
					            <optional>true</optional>
 | 
				
			||||||
        </dependency>
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <dependency>
 | 
					 | 
				
			||||||
            <groupId>org.springframework.boot</groupId>
 | 
					 | 
				
			||||||
            <artifactId>spring-boot-starter-test</artifactId>
 | 
					 | 
				
			||||||
            <scope>test</scope>
 | 
					 | 
				
			||||||
        </dependency>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <!-- Lombok(在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁) -->
 | 
					        <!-- Lombok(在 Java 开发过程中用注解的方式,简化了 JavaBean 的编写,避免了冗余和样板式代码,让编写的类更加简洁) -->
 | 
				
			||||||
        <dependency>
 | 
					        <dependency>
 | 
				
			||||||
            <groupId>org.projectlombok</groupId>
 | 
					            <groupId>org.projectlombok</groupId>
 | 
				
			||||||
@@ -99,28 +101,12 @@ limitations under the License.
 | 
				
			|||||||
    </dependencies>
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <build>
 | 
					    <build>
 | 
				
			||||||
        <!-- 设置构建的 jar 包名 -->
 | 
					 | 
				
			||||||
        <finalName>${project.name}</finalName>
 | 
					 | 
				
			||||||
        <plugins>
 | 
					        <plugins>
 | 
				
			||||||
            <!-- 代码等格式化插件 -->
 | 
					            <!-- 代码等格式化插件 -->
 | 
				
			||||||
            <plugin>
 | 
					            <plugin>
 | 
				
			||||||
                <groupId>com.diffplug.spotless</groupId>
 | 
					                <groupId>com.diffplug.spotless</groupId>
 | 
				
			||||||
                <artifactId>spotless-maven-plugin</artifactId>
 | 
					                <artifactId>spotless-maven-plugin</artifactId>
 | 
				
			||||||
                <version>${spotless.version}</version>
 | 
					                <version>${spotless.version}</version>
 | 
				
			||||||
                <configuration>
 | 
					 | 
				
			||||||
                    <java>
 | 
					 | 
				
			||||||
                        <importOrder>
 | 
					 | 
				
			||||||
                            <order>java,javax,org,com,top.charles7c,</order>
 | 
					 | 
				
			||||||
                        </importOrder>
 | 
					 | 
				
			||||||
                        <removeUnusedImports/>
 | 
					 | 
				
			||||||
                        <eclipse>
 | 
					 | 
				
			||||||
                            <file>${project.basedir}/code-style/spotless-formatter.xml</file>
 | 
					 | 
				
			||||||
                        </eclipse>
 | 
					 | 
				
			||||||
                        <licenseHeader>
 | 
					 | 
				
			||||||
                            <file>${project.basedir}/code-style/license-header</file>
 | 
					 | 
				
			||||||
                        </licenseHeader>
 | 
					 | 
				
			||||||
                    </java>
 | 
					 | 
				
			||||||
                </configuration>
 | 
					 | 
				
			||||||
                <executions>
 | 
					                <executions>
 | 
				
			||||||
                    <execution>
 | 
					                    <execution>
 | 
				
			||||||
                        <phase>compile</phase>
 | 
					                        <phase>compile</phase>
 | 
				
			||||||
@@ -129,38 +115,19 @@ limitations under the License.
 | 
				
			|||||||
                        </goals>
 | 
					                        </goals>
 | 
				
			||||||
                    </execution>
 | 
					                    </execution>
 | 
				
			||||||
                </executions>
 | 
					                </executions>
 | 
				
			||||||
            </plugin>
 | 
					 | 
				
			||||||
            <!-- 单元测试配置插件 -->
 | 
					 | 
				
			||||||
            <plugin>
 | 
					 | 
				
			||||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
					 | 
				
			||||||
                <artifactId>maven-surefire-plugin</artifactId>
 | 
					 | 
				
			||||||
                <configuration>
 | 
					                <configuration>
 | 
				
			||||||
                    <argLine>-Dfile.encoding=UTF-8</argLine>
 | 
					                    <java>
 | 
				
			||||||
                    <!-- 根据启用环境执行对应 @Tag 的测试方法 -->
 | 
					                        <importOrder>
 | 
				
			||||||
                    <groups>${profiles.active}</groups>
 | 
					                            <order>java,javax,org,com,top.charles7c,</order>
 | 
				
			||||||
                    <!-- 排除标签 -->
 | 
					                        </importOrder>
 | 
				
			||||||
                    <excludedGroups>exclude</excludedGroups>
 | 
					                        <removeUnusedImports/>
 | 
				
			||||||
                </configuration>
 | 
					                        <eclipse>
 | 
				
			||||||
            </plugin>
 | 
					                            <file>code-style/spotless-formatter.xml</file>
 | 
				
			||||||
            <plugin>
 | 
					                        </eclipse>
 | 
				
			||||||
                <groupId>org.springframework.boot</groupId>
 | 
					                        <licenseHeader>
 | 
				
			||||||
                <artifactId>spring-boot-maven-plugin</artifactId>
 | 
					                            <file>code-style/license-header</file>
 | 
				
			||||||
                <executions>
 | 
					                        </licenseHeader>
 | 
				
			||||||
                    <execution>
 | 
					                    </java>
 | 
				
			||||||
                        <goals>
 | 
					 | 
				
			||||||
                            <goal>repackage</goal>
 | 
					 | 
				
			||||||
                        </goals>
 | 
					 | 
				
			||||||
                    </execution>
 | 
					 | 
				
			||||||
                </executions>
 | 
					 | 
				
			||||||
                <configuration>
 | 
					 | 
				
			||||||
                    <!-- 如果没有该项配置,devtools 不会生效,应用不会自动重启 -->
 | 
					 | 
				
			||||||
                    <fork>true</fork>
 | 
					 | 
				
			||||||
                    <excludes>
 | 
					 | 
				
			||||||
                        <exclude>
 | 
					 | 
				
			||||||
                            <groupId>org.projectlombok</groupId>
 | 
					 | 
				
			||||||
                            <artifactId>lombok</artifactId>
 | 
					 | 
				
			||||||
                        </exclude>
 | 
					 | 
				
			||||||
                    </excludes>
 | 
					 | 
				
			||||||
                </configuration>
 | 
					                </configuration>
 | 
				
			||||||
            </plugin>
 | 
					            </plugin>
 | 
				
			||||||
        </plugins>
 | 
					        </plugins>
 | 
				
			||||||
@@ -171,7 +138,7 @@ limitations under the License.
 | 
				
			|||||||
                <includes>
 | 
					                <includes>
 | 
				
			||||||
                    <include>**/**</include>
 | 
					                    <include>**/**</include>
 | 
				
			||||||
                </includes>
 | 
					                </includes>
 | 
				
			||||||
                <!-- 启用过滤,即该资源中的变量将会被替换 -->
 | 
					                <!-- 启用过滤,即替换对应资源中的变量 -->
 | 
				
			||||||
                <filtering>true</filtering>
 | 
					                <filtering>true</filtering>
 | 
				
			||||||
            </resource>
 | 
					            </resource>
 | 
				
			||||||
        </resources>
 | 
					        </resources>
 | 
				
			||||||
@@ -185,7 +152,7 @@ limitations under the License.
 | 
				
			|||||||
                <!-- Spring Boot 启用环境 -->
 | 
					                <!-- Spring Boot 启用环境 -->
 | 
				
			||||||
                <profiles.active>dev</profiles.active>
 | 
					                <profiles.active>dev</profiles.active>
 | 
				
			||||||
                <!-- 日志级别 -->
 | 
					                <!-- 日志级别 -->
 | 
				
			||||||
                <logging.level>debug</logging.level>
 | 
					                <logging.level>DEBUG</logging.level>
 | 
				
			||||||
                <!-- 日志存储位置 -->
 | 
					                <!-- 日志存储位置 -->
 | 
				
			||||||
                <logging.file.path>./logs</logging.file.path>
 | 
					                <logging.file.path>./logs</logging.file.path>
 | 
				
			||||||
            </properties>
 | 
					            </properties>
 | 
				
			||||||
@@ -198,7 +165,7 @@ limitations under the License.
 | 
				
			|||||||
            <id>prod</id>
 | 
					            <id>prod</id>
 | 
				
			||||||
            <properties>
 | 
					            <properties>
 | 
				
			||||||
                <profiles.active>prod</profiles.active>
 | 
					                <profiles.active>prod</profiles.active>
 | 
				
			||||||
                <logging.level>info</logging.level>
 | 
					                <logging.level>INFO</logging.level>
 | 
				
			||||||
                <logging.file.path>./logs</logging.file.path>
 | 
					                <logging.file.path>./logs</logging.file.path>
 | 
				
			||||||
            </properties>
 | 
					            </properties>
 | 
				
			||||||
        </profile>
 | 
					        </profile>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user