2020-12-03 常用的jar包总结

Thymeleaf

		<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
<!-- 前端页面需要的头部: -->
  xmlns:th="http://www.thymeleaf.org"

在这里插入图片描述

thymeleaf-shiro

<dependency>
    <groupId>com.github.theborakompanioni</groupId>
    <artifactId>thymeleaf-extras-shiro</artifactId>
    <version>2.0.0</version>
</dependency>
<!-- 前端页面需要的头部: -->
xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro"

Mysql+Mybatis

//连接数据库
		<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            //在springcloud用到的时候需要写版本号!!!!
        </dependency>
        //连接数据库时有可能会遇到时区设置的问题
        //jdbc:mysql://127.0.0.1:3306/text1?serverTimezone=Asia/Shanghai
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
//mybatis
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.2</version>
        </dependency>
        
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
//spring + mybatis
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>2.0.2</version>
        </dependency>
//springboot + mybatis        
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.4</version>
        </dependency>

DBCP数据库连接池

	<dependency>
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>commons-pool</groupId>
        <artifactId>commons-pool</artifactId>
        <version>1.6</version>
    </dependency>

Swagger

		<dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.8.0</version>
        </dependency>

lombok

<!--在封装类上添加!@Data注解就可以不用手动写get、se、tostring-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.16</version>
            <scope>provided</scope>
        </dependency>

junit 单元测试

			<dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </dependency>

fastdfs

	<dependency>
        <groupId>cn.bestwu</groupId>
        <artifactId>fastdfs-client-java</artifactId>
        <version>1.27</version>
    </dependency>

Redis

<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
	<dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>2.9.0</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-redis</artifactId>
        <version>2.2.0.RELEASE</version>
    </dependency>

Fileupload

<!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3.3</version>
    </dependency>

Log4j

	<dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>

DOM4J

	<dependency>
	    <groupId>dom4j</groupId>
	    <artifactId>dom4j</artifactId>
	    <version>1.6.1</version>
	</dependency>

logback

<!--            logback-->
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>1.2.3</version>
            </dependency>

druid 数据源

	<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.1.2</version>
    </dependency>

pagehelper分页插件

<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
            <version>4.1.6</version>
        </dependency>

邮件

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail -->
//springboot+mail 
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
    <version>2.4.0</version>
</dependency>

dubbo+Zookeeper

// springboot+dubbo
<dependency>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-spring-boot-starter</artifactId>
    <version>2.7.8</version>
</dependency>
//springboot+Zookeeper
<dependency>
    <groupId>com.github.sgroschupf</groupId>
    <artifactId>zkclient</artifactId>
    <version>0.1</version>
</dependency>
<!-- 日志会冲突-->
<!-- 引入zookeeper-->
<dependency>
	<groupId>org.apache.curator</groupId>
	<artifactId>curator-framework</artifactId>
	<version>2.12.8</version>
</dependency>
<dependency>
	<groupId>org.apache.curator</groupId>
	<artifactId>curator-recipes</artifactId>
	<version>2.12.8</version>
</dependency>
<dependency>
	<groupid>org.apache.zookeeper</groupId>
	<artifactId>zookeeper</artifactId>
	<version>3.4.14</ version>
<!--菲除这个sLf4j-Log4ji2-->
	<exclusions>
		<exclusion>
			<groupId>org.s1f4j</groupId>
			<artifactId>s1f4j-1og4j12</artifactId>
		</exclusion>
	</exclusions>
</dependency>

SpringCloud

//在父项目用到的jar包

  • SpringCloud的包
	<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>Hoxton.SR8</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
  • springboot的包
<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-dependencies</artifactId>
     <version>2.4.0</version>
      <type>pom</type>
    <scope>import</scope>
</dependency>

springboot+test

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-test -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-test</artifactId>
</dependency>

springboot+web

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>2.4.0</version>
</dependency>

springboot+jetty

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
    <version>2.4.0</version>
</dependency>

热部署工具

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <version>2.4.0</version>
</dependency>

Eureka

 //开启服务的!!
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-eureka-server</artifactId>
    <version>1.4.6.RELEASE</version>
</dependency>

Ribbon

 <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-ribbon</artifactId>
    <version>1.4.6.RELEASE</version>
 </dependency>

Feign

	<dependency>
	      <groupId>org.springframework.cloud</groupId>
	      <artifactId>spring-cloud-starter-feign</artifactId>
	      <version>1.4.6.RELEASE</version>
	</dependency>

Hystrix

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
            <version>1.4.6.RELEASE</version>
        </dependency>

Hystrix-dashboard

//数据流监控
		<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
            <version>1.4.6.RELEASE</version>
        </dependency>
commons-io-2.2.jar是一个用于Java开发的常用依赖。它提供了许多实用的工具类和方法,用于简化文件和流的输入输出操作。 commons-io-2.2.jar包含了多个类,其中一些主要的类和功能括: 1. FileUtils类:提供了一系列静态方法,用于操作文件,如复制、移动、删除、比较文件等。 2. IOUtils类:提供了一系列静态方法,用于操作输入输出流,如读取、写入、关闭流等。 3. FilenameUtils类:提供了一系列静态方法,用于操作文件名,如获取名字、扩展名、路径等。 4. IOCase类:提供了一系列枚举常量,用于指定文件名比较的大小写敏感性。 使用commons-io-2.2.jar依赖,可以在项目中轻松地进行文件和流的处理。例如,可以使用FileUtils类的静态方法复制文件、移动文件或删除文件。使用IOUtils类的静态方法可以方便地读取文件内容、写入文件内容,同时还可以保证在操作完毕后,流会被正确地关闭。 此外,commons-io-2.2.jar还提供了许多其他有用的功能,例如操作文件的符号链接、文件滚动、文件比较等。它具有良好的性能和稳定性,并且广泛用于各种Java项目中。 总结而言,commons-io-2.2.jar是一个重要的Java依赖,它提供了简化文件和流的输入输出操作的工具类和方法。通过使用此依赖,可以方便地进行文件和流的操作,提高开发效率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值