【汇总】Maven常用依赖包 (持续更新...)

- pom.xml模板

将开发过程常用的maven依赖汇总下来,不用每次都去maven仓库查询,可以节省很多时间。


<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.0modelVersion>
    
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.5.1version>
        <relativePath/>
    parent>
    
    <groupId>com.daoge.seatagroupId>
    <artifactId>spring-boot-samplesartifactId>
    <name>spring-boot-samplesname>
    <version>0.0.1-SNAPSHOTversion>
    <packaging>pompackaging>
    <description>Demo project for Spring Bootdescription>

    <properties>
        <java.version>1.8java.version>
        <maven-deploy-plugin.version>3.0.0-M1maven-deploy-plugin.version>
        <maven-compiler-plugin.version>3.8.1maven-compiler-plugin.version>
        <springboot.verison>2.5.1springboot.verison>
    properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starterartifactId>
                <version>${springboot.verison}version>
            dependency>
        dependencies>
    dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-deploy-pluginartifactId>
                <version>${maven-deploy-plugin.version}version>
                <configuration>
                    <skip>trueskip>
                configuration>
            plugin>
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-compiler-pluginartifactId>
                <version>${maven-compiler-plugin.version}version>
                <configuration>
                    <source>${java.version}source>
                    <target>${java.version}target>
                configuration>
            plugin>
        plugins>
    build>
project>

- springboot

<properties>
    <springboot.verison>2.5.1springboot.verison>
properties>

<dependencies>
    
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starterartifactId>
        <version>${springboot.verison}version>
    dependency>
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-webartifactId>
        <version>${springboot.verison}version>
    dependency>
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-testartifactId>
        <version>${springboot.verison}version>
    dependency>
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-maven-pluginartifactId>
        <version>${springboot.verison}version>
    dependency>
dependencies>

- db

<properties>
	<mysql-connector.version>5.1.49mysql-connector.version>
    <druid.version>1.2.6druid.version>
    <mybatis.version>2.2.0mybatis.version>
    <mybatis-plus.version>3.4.3mybatis-plus.version>
    <tk-mybatis.version>2.1.5tk-mybatis.version>
    <lombok.version>1.18.20lombok.version>    
properties>

<dependencies>
    
    <dependency>
        <groupId>mysqlgroupId>
        <artifactId>mysql-connector-javaartifactId>
        <version>${mysql-connector.version}version>
    dependency>
    <dependency>
        <groupId>com.alibabagroupId>
        <artifactId>druidartifactId>
        <version>${druid.version}version>
    dependency>
    <dependency>
        <groupId>org.mybatis.spring.bootgroupId>
        <artifactId>mybatis-spring-boot-starterartifactId>
        <version>${mybatis.version}version>
    dependency>
    <dependency>
        <groupId>com.baomidougroupId>
        <artifactId>mybatis-plusartifactId>
        <version>${mybatis-plus.version}version>
    dependency>
    <dependency>
        <groupId>tk.mybatisgroupId>
        <artifactId>mapper-spring-boot-starterartifactId>
        <version>${tk-mybatis.version}version>
    dependency>
    <dependency>
        <groupId>org.projectlombokgroupId>
        <artifactId>lombokartifactId>
        <version>${lombok.version}version>
    dependency>
dependencies>

- nacos

<properties>        
    <nacos.version>0.2.3nacos.version>
    <nacos-client.verison>1.1.3nacos-client.verison>  
properties>

<dependencies>
    
    <dependency>
        <groupId>com.alibaba.nacosgroupId>
        <artifactId>nacos-clientartifactId>
        <version>${nacos-client.verison}version>
    dependency>
dependencies>

- dubbo

<properties>        
    <apache.dubbo.version>2.7.12apache.dubbo.version>
	<nacos-client.verison>1.4.2nacos-client.verison>
properties>

<dependencies>
    
    
    <dependency>
        <groupId>org.apache.dubbogroupId>
        <artifactId>dubbo-spring-boot-starterartifactId>
        <version>${apache.dubbo.version}version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.dubbogroupId>
                <artifactId>dubboartifactId>
            exclusion>
        exclusions>
    dependency>
    <dependency>
        <groupId>org.apache.dubbogroupId>
        <artifactId>dubboartifactId>
        <version>${apache.dubbo.version}version>
    dependency>
    
    <dependency>
        <groupId>org.apache.dubbogroupId>
        <artifactId>dubbo-registry-nacosartifactId>
        <version>${apache.dubbo.version}version>
        <exclusions>
            <exclusion>
                <groupId>com.alibaba.nacosgroupId>
                <artifactId>nacos-clientartifactId>
            exclusion>
        exclusions>
    dependency>
    <dependency>
        <groupId>com.alibaba.nacosgroupId>
        <artifactId>nacos-clientartifactId>
        <version>${nacos-client.verison}version>
    dependency>
dependencies>

- seata

<properties>     
    <seata-spring-boot-starter.version>1.4.2seata-spring-boot-starter.version>
    <seata-all.version>1.4.2seata-all.version>
properties>

<dependencies>
    
    <dependency>
        <groupId>io.seatagroupId>
        <artifactId>seata-spring-boot-starterartifactId>
        <version>${seata-spring-boot-starter.version}version>
        <exclusions>
            <exclusion>
                <groupId>io.seatagroupId>
                <artifactId>seata-allartifactId>
            exclusion>
        exclusions>
    dependency>
    <dependency>
        <groupId>io.seatagroupId>
        <artifactId>seata-allartifactId>
        <version>${seata-all.version}version>
    dependency>
dependencies>        

- netty

<properties>     
    <netty-all.version>4.1.32.Finalnetty-all.version>
properties>

<dependencies>
    
    <dependency>
        <groupId>io.nettygroupId>
        <artifactId>netty-allartifactId>
        <version>${netty-all.version}version>
    dependency>
dependencies>

- utils

<properties>     
    <apache.httpclient.version>4.5apache.httpclient.version>
    <alibaba.spring-context-support.version>1.0.11alibaba.spring-context-support.version>
    <fastjson.version>1.2.47fastjson.version>
    <commons-lang3.version>3.9commons-lang3.version>
    <guava.version>27.0.1-jreguava.version>
properties>

<dependencies>
    
    <dependency>
        <groupId>org.apache.httpcomponentsgroupId>
        <artifactId>httpclientartifactId>
        <version>${apache.httpclient.version}version>
    dependency>
    
    <dependency>
        <groupId>com.alibaba.springgroupId>
        <artifactId>spring-context-supportartifactId>
        <version>${alibaba.spring-context-support.version}version>
    dependency>
    
    <dependency>
        <groupId>com.alibabagroupId>
        <artifactId>fastjsonartifactId>
        <version>${fastjson.version}version>
    dependency>
    
    <dependency>
        <groupId>org.apache.commonsgroupId>
        <artifactId>commons-lang3artifactId>
        <version>${commons-lang3.version}version>
    dependency>
    
    <dependency>
        <groupId>com.google.guavagroupId>
        <artifactId>guavaartifactId>
        <version>${guava.version}version>
    dependency>
dependencies>

微信公众号 - 稻哥说编程(RedCode1024)博主,从事程序开发10余年,分享有用的行业解决方案,欢迎留言交流。

你可能感兴趣的:(java基础,maven)