Skip to content

xmagic-dependencies使用说明

当前版本 1.0.8

JDK版本 JDK17

SpringBoot版本 3.3.7

使用

xmagic-dependencies,增加SpringBoot不包含的三方依赖和依赖版本的统一处理,避免冲突。

Maven

xml

<dependencyManagement>
    <dependencies>
        <dependency>
            <artifactId>xmagic-dependencies</artifactId>
            <groupId>tech.xmagic</groupId>
            <version>${xmagic-dependencies.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Gradle

Spring boot 环境中可以开启 apply plugin: "io.spring.dependency-management" 插件。

groovy
dependencyManagement {
  imports {
    mavenBom "tech.xmagic:xmagic-dependencies:${xmagic-dependencies.version}"
  }
}

使用 snapshots

注意:snapshots 版本会及时响应,修复最新的 bug 或者必要的需求。

maven

xml

<repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
</repositories>

gradle

groovy
repositories {
  mavenLocal()
  maven { url "https://maven.aliyun.com/repository/public" }
  maven { url "https://maven.aliyun.com/repository/spring" }
  maven { url "https://maven.aliyun.com/repository/spring-plugin" }
  maven { url "https://repo.spring.io/libs-release" }
  maven { url "https://repo.spring.io/milestone" }
  // 添加 snapshots 库地址
  maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  mavenCentral()
}

依赖列表

Hutool 🏆

Java工具类库

版本:5.8.35

xml
<dependency>
    <groupId>cn.hutool</groupId>
    <artifactId>hutool-all</artifactId>
</dependency>

fastjson2

fastjson2是一个性能极致并且简单易用的Java JSON库

版本:2.0.54

xml
<dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2</artifactId>
</dependency>

dom4j

dom4j是一个处理xml的工具包

版本:2.1.4

xml
<dependency>
    <groupId>org.dom4j</groupId>
    <artifactId>dom4j</artifactId>
</dependency>

druid

版本:1.2.24

xml
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
</dependency>

mybatis-plus 🏆

版本:3.5.10

xml
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus</artifactId>
</dependency>

mybatis-flex 🏆

版本:1.10.5

xml
<dependency>
    <groupId>com.mybatis-flex</groupId>
    <artifactId>mybatis-flex-core</artifactId>
</dependency>
<dependency>
    <groupId>com.mybatis-flex</groupId>
    <artifactId>mybatis-flex-processor</artifactId>
    <scope>provided</scope>
</dependency>

mapstruct 🏆

版本:1.6.3

xml
<dependency>
    <groupId>org.mapstruct</groupId>
    <artifactId>mapstruct</artifactId>
</dependency>

httpclient5 🏆

版本:5.4.1

xml
<dependency>
    <groupId>org.apache.httpcomponents.client5</groupId>
    <artifactId>httpclient5</artifactId>
</dependency>

mysql-connector-j 🏆

版本:8.4.0

xml
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
</dependency>

mariadb-java-client 🏆

版本:3.5.1

xml
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
</dependency>

flyway-core 🏆

版本:11.1.1

xml
<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-core</artifactId>
</dependency>