初始化项目

This commit is contained in:
2026-04-21 15:52:07 +08:00
parent d9b560f793
commit 3125a816b4
4 changed files with 356 additions and 18 deletions

35
.gitignore vendored
View File

@@ -1,20 +1,21 @@
# ---> Actionscript
# Build and Release Folders
bin-debug/
bin-release/
[Oo]bj/
[Bb]in/
# ---> Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
# Other files and folders
# ---> Eclipse
.settings/
.project
.classpath
# Executables
*.swf
*.air
*.ipa
*.apk
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.
# ---> Idea
.idea/
*.iml

View File

@@ -1,3 +1,21 @@
# xtools-parent-boot
低调大师工具箱,boot-pom文件,适配JDK25
> 为所有的xtools-boot工具提供包版本统一管理,建议所有的boot项目继承该包构建项目
## 更新记录
* 2026-01-01 创建项目
## Maven 打包命令
```sh
# 清理并打包
mvn clean package -DskipTests=true
# 清理,打包并安装到本地Maven仓库
mvn clean package install -DskipTests=true
# 清理,打包,安装到本地Maven仓库并发布到远程私有Maven仓库
mvn clean package install deploy -DskipTests=true
```

268
pom.xml Normal file
View File

@@ -0,0 +1,268 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.xujun</groupId>
<artifactId>xtools-parent-boot</artifactId>
<version>5.0.0</version>
<packaging>pom</packaging>
<name>xtools-parent-boot</name>
<description>低调大师工具箱,boot-pom文件,适配JDK25</description>
<!-- 引用 SpringBoot pom文件 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.5</version>
<relativePath/>
</parent>
<!-- 组织信息 -->
<organization>
<name>org.xujun</name>
<url>https://www.xujun.org</url>
</organization>
<!-- 子模块 -->
<modules>
<module>xtools-parent-cloud</module>
</modules>
<!-- 属性配置 -->
<properties>
<!-- 项目配置信息 begin -->
<!-- 项目编码 -->
<project.def.encoding>UTF-8</project.def.encoding>
<project.build.sourceEncoding>${project.def.encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.def.encoding}</project.reporting.outputEncoding>
<!-- 项目配置信息 end -->
<!-- 版本号 begin -->
<!-- Maven 插件 -->
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
<cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
<!-- xtools -->
<xtools.version>5.0.0</xtools.version>
<!-- xtools-boot-knife4j begin -->
<swagger-annotations.version>2.2.48</swagger-annotations.version>
<springdoc-openapi-starter-webmvc-ui.version>3.0.3</springdoc-openapi-starter-webmvc-ui.version>
<knife4j-openapi3-jakarta.version>4.5.0</knife4j-openapi3-jakarta.version>
<!-- xtools-boot-knife4j end -->
<!-- xtools-boot-db begin -->
<druid.version>1.2.28</druid.version>
<mybatis-spring-boot-starter.version>4.0.1</mybatis-spring-boot-starter.version>
<mybatis-plus.version>3.5.16</mybatis-plus.version>
<!-- xtools-boot-db end -->
<!-- boot-admin -->
<spring-boot-admin.version>4.0.3</spring-boot-admin.version>
<!-- xxl-job -->
<xxl-job-core.version>3.4.0</xxl-job-core.version>
<!-- tool begin -->
<lombok.version>1.18.44</lombok.version>
<mapstruct.version>1.6.3</mapstruct.version>
<!-- tool end -->
<!-- 版本号 end -->
</properties>
<!-- 依赖 -->
<dependencies>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- Slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- 工具模块 begin -->
<!-- xtool-common 模块 -->
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-core</artifactId>
</dependency>
<!-- 工具模块 end -->
</dependencies>
<!-- 依赖管理 -->
<dependencyManagement>
<dependencies>
<!-- xtools-parent 依赖 -->
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-parent</artifactId>
<version>${xtools.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- xtools-dependencies 依赖 -->
<dependency>
<groupId>org.xujun</groupId>
<artifactId>xtools-dependencies</artifactId>
<version>${xtools.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- xtools-boot-knife4j begin -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<!-- springdoc -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${springdoc-openapi-starter-webmvc-ui.version}</version>
</dependency>
<!-- knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>${knife4j-openapi3-jakarta.version}</version>
</dependency>
<!-- xtools-boot-knife4j end -->
<!-- xtools-boot-db begin -->
<!-- Druid(数据库连接池) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-4-starter</artifactId>
<version>${druid.version}</version>
<scope>compile</scope>
</dependency>
<!-- MyBatis -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot-starter.version}</version>
<exclusions>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- SpringBootAdmin begin -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- SpringBootAdmin end -->
<!-- xxl-job -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>${xxl-job-core.version}</version>
<scope>compile</scope>
</dependency>
<!-- mybatis-plus begin -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<!-- mybatis-plus end -->
<!-- xtools-boot-db end -->
</dependencies>
</dependencyManagement>
<!-- 构建 -->
<build>
<pluginManagement>
<plugins>
<!-- cyclonedx 生成依赖分析 -->
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>${cyclonedx-maven-plugin.version}</version>
<executions>
<execution>
<!-- 在打包阶段执行 -->
<phase>prepare-package</phase>
<goals>
<!-- 生成聚合的BOM文件 -->
<goal>makeAggregateBom</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- 关键配置: 指定SBOM文件的输出路径 -->
<!-- 这里配置为输出到classes目录,这样SBOM就会被打包进JAR中 -->
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<outputName>bom</outputName>
<outputFormat>json</outputFormat>
<!-- 包含运行时的依赖范围,这对应用运行最重要 -->
<includeRuntimeScope>true</includeRuntimeScope>
<includeCompileScope>true</includeCompileScope>
<includeProvidedScope>false</includeProvidedScope>
<includeTestScope>false</includeTestScope>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- 编译插件(设置源代码的JDK版本,目标代码JDK版本,编译字符集) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- Maven 源码插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xujun</groupId>
<artifactId>xtools-parent-boot</artifactId>
<version>5.0.0</version>
</parent>
<packaging>pom</packaging>
<artifactId>xtools-parent-cloud</artifactId>
<!-- 属性配置 -->
<properties>
<!-- SpringCloud -->
<spring-cloud-dependencies.version>2025.1.1</spring-cloud-dependencies.version>
<!-- AlibabaCloud -->
<alibaba-cloud.version>2025.1.0.0</alibaba-cloud.version>
</properties>
<!-- 依赖管理 -->
<dependencyManagement>
<dependencies>
<!-- spring-cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- AlibabaCloud -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${alibaba-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Druid(解决AlibabaCloud里面版本冲突) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>