日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

pom.xml中的常用依赖包总结

發布時間:2023/12/15 综合教程 34 生活家
生活随笔 收集整理的這篇文章主要介紹了 pom.xml中的常用依赖包总结 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

pom.xml是maven項目中的一個很重要的文件,很多依賴都在這個文件中配置。

pom.xml依賴的配置主要分為:

兩大依賴:1.模塊依賴;2.框架依賴

三個部分:1.對于項目本身模塊的依賴;2:對于自己公司的封裝包的依賴;3:對于第三方包的依賴。

(一)、Dao層的典型依賴-----和數據相關的依賴

1.spring-jdbc

1 <dependency>
2        <groupId>org.springframework</groupId>
3        <artifactId>spring-jdbc</artifactId>
4 </dependency>

2.spring-data-commons(分頁...)

1 <dependency>
2       <groupId>org.springframework.data</groupId>
3       <artifactId>spring-data-commons</artifactId>
4 </dependency>

3.mybatis( 公司包)

1 <dependency>
2       <groupId>com.xxxx.framework</groupId>
3       <artifactId>xxxx-mybatis</artifactId>
4 </dependency>

4.redis(公司包)

1 <dependency>
2       <groupId>com.vivo.framework</groupId>
3       <artifactId>vivo-redis</artifactId>
4 </dependency>

(二)、Service層的典型依賴:

Apache:

1. common-lang3----各種工具類(StringUtils...)

1 <dependency>
2        <groupId>org.apache.commons</groupId>
3        <artifactId>commons-lang3</artifactId>
4 </dependency>

https://zhidao.baidu.com/question/587200456967870805.html

2.common-collections(集合工具類)

1 <dependency>
2       <groupId>commons-collections</groupId>
3       <artifactId>commons-collections</artifactId>
4 </dependency>

3. common-io(IO工具類)

1 <dependency>
2       <groupId>commons-io</groupId>
3       <artifactId>commons-io</artifactId>
4 </dependency>

4. Json

4.1 json 三大組件:

 1 <dependency>
 2       <groupId>com.fasterxml.jackson.core</groupId>
 3       <artifactId>jackson-core</artifactId>
 4 </dependency>
 5 <dependency>
 6       <groupId>com.fasterxml.jackson.core</groupId>
 7       <artifactId>jackson-databind</artifactId>
 8  </dependency>
 9 <dependency>
10       <groupId>com.fasterxml.jackson.core</groupId>
11       <artifactId>jackson-annotations</artifactId>
12  </dependency>

4.2 其他的json三方包---alibaba

1 <dependency>
2        <groupId>com.alibaba</groupId>
3        <artifactId>fastjson</artifactId>
4 </dependency>

5. 日志

 1 <!--log-->
 2 <dependency>
 3       <groupId>org.slf4j</groupId>
 4       <artifactId>slf4j-api</artifactId>
 5 </dependency>
 6 <dependency>
 7        <groupId>log4j</groupId>
 8        <artifactId>log4j</artifactId>
 9  </dependency>
10  <dependency>
11         <groupId>org.slf4j</groupId>
12         <artifactId>slf4j-log4j12</artifactId>
13  </dependency>
14   
15 <!-- common-logging -->
16 <dependency>
17        <groupId>org.slf4j</groupId>
18        <artifactId>jcl-over-slf4j</artifactId>
19  </dependency>
20  
21 <!-- java.util.logging  -->
22 <dependency>
23        <groupId>org.slf4j</groupId>
24        <artifactId>jul-to-slf4j</artifactId>
25 </dependency>

6.Spring(7大組件)

 1 <!--spring start -->
 2 <dependency>
 3      <groupId>org.springframework</groupId>
 4      <artifactId>spring-core</artifactId>
 5 </dependency>
 6 <dependency>
 7       <groupId>org.springframework</groupId>
 8       <artifactId>spring-beans</artifactId>
 9 </dependency>
10 <dependency>
11        <groupId>org.springframework</groupId>
12        <artifactId>spring-context</artifactId>
13 </dependency>
14 <dependency>
15        <groupId>org.springframework</groupId>
16        <artifactId>spring-context-support</artifactId>
17 </dependency>
18 <dependency>
19        <groupId>org.springframework</groupId>
20        <artifactId>spring-aop</artifactId>
21 </dependency>
22 <dependency>
23        <groupId>org.springframework</groupId>
24        <artifactId>spring-aspects</artifactId>
25 </dependency>
26 <dependency>
27        <groupId>org.springframework</groupId>
28        <artifactId>spring-expression</artifactId>
29 </dependency>
30 <!--spring end -->

7. xxxx-commons(公司框架--讀寫分離、多庫多表....)

1 <dependency>
2       <groupId>com.xxxx.framework</groupId>
3       <artifactId>xxxx-commons</artifactId>
4 </dependency>

8.commons-validator(通用驗證系統)

1 <dependency>
2       <groupId>commons-validator</groupId>
3       <artifactId>commons-validator</artifactId>
4 </dependency>

9.dubbo(阿里巴巴的分布式框架)

 1 <dependency>
 2       <groupId>com.alibaba</groupId>
 3       <artifactId>dubbo</artifactId>
 4       <exclusions>
 5            <exclusion>
 6                 <artifactId>curator-client</artifactId>
 7                 <groupId>org.apache.curator</groupId>
 8             </exclusion>
 9        </exclusions>
10 </dependency>

10.curator-framework(Zookeeper客戶端)

1 <dependency>
2      <groupId>org.apache.curator</groupId>
3      <artifactId>curator-framework</artifactId>
4 </dependency>

11.Dao層的依賴(spring-jdbc/spring-data-commons/mybatis/redis)

 1 <dependency>
 2       <groupId>org.springframework</groupId>
 3       <artifactId>spring-jdbc</artifactId>
 4 </dependency>
 5 
 6 <dependency>
 7       <groupId>org.springframework.data</groupId>
 8       <artifactId>spring-data-commons</artifactId>
 9 </dependency>
10 
11 <dependency>
12        <groupId>com.vivo.framework</groupId>
13        <artifactId>vivo-mybatis</artifactId>
14 </dependency>
1 <dependency>
2       <groupId>com.vivo.framework</groupId>
3       <artifactId>vivo-redis</artifactId>
4 </dependency>

(三)、Web層的典型依賴:

1. 模塊依賴對Service層的依賴

2.框架依賴

2.1 spring-web

1 <dependency>
2       <groupId>org.springframework</groupId>
3       <artifactId>spring-web</artifactId>
4 </dependency>

2.2 spring-webmvc

1 <dependency>
2       <groupId>org.springframework</groupId>
3       <artifactId>spring-webmvc</artifactId>
4 </dependency>

2.3servlet-api(前端控制器DispacherServlet就是一個servlet)

1 <dependency>
2       <groupId>javax.servlet</groupId>
3       <artifactId>servlet-api</artifactId>
4        <scope>provided</scope>//如果不配置scope,會把jar包發布,會跟容器里的jar包沖突
5 </dependency>

JSTL使用需要的兩個包

2.4 jstl(java script tag language)

1 <dependency>
2       <groupId>jstl</groupId>
3        <artifactId>jstl</artifactId>
4 </dependency>

2.5 taglibs(標簽庫)

1 <dependency>
2       <groupId>taglibs</groupId>
3       <artifactId>standard</artifactId>
4 </dependency>

至此,Dao、Service、Web三個層的常用的依賴包就基本羅列完成,下面詳細分析每個包.

總結

以上是生活随笔為你收集整理的pom.xml中的常用依赖包总结的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。