Maven常用依赖包简单

Maven官方仓库:Maven Repository: junit » junit (mvnrepository.com)

Maven打包war包

复制代码
 1     <!-- 使用maven打包war包 -->
 2     <build>
 3         <plugins>
 4             <plugin>
 5                 <groupId>org.apache.maven.plugins</groupId>
 6                 <artifactId>maven-war-plugin</artifactId>
 7                 <version>3.2.0</version>
 8             </plugin>
 9         </plugins>
10     </build>
复制代码

Mysql

1 <!--Mysql-->
2 <dependency>
3     <groupId>mysql</groupId>
4     <artifactId>mysql-connector-java</artifactId>
5     <version>8.0.25</version>
6 </dependency>

JDBC

1 <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
2 <dependency>
3    <groupId>org.springframework</groupId>
4    <artifactId>spring-jdbc</artifactId>
5    <version>5.3.11</version>
6 </dependency>

Druid

1 <!-- 数据库连接池 -->
2 <dependency>
3     <groupId>com.alibaba</groupId>
4     <artifactId>druid</artifactId>
5     <version>1.1.21</version>
6 </dependency>

Junit

1 <!-- https://mvnrepository.com/artifact/junit/junit -->
2 <dependency>
3    <groupId>junit</groupId>
4    <artifactId>junit</artifactId>
5    <version>4.13.2</version>
6    <scope>test</scope>
7 </dependency>

C3P0

1 <!--Mysql-->
2 <dependency>
3    <groupId>com.mchange</groupId>
4    <artifactId>c3p0</artifactId>
5    <version>0.9.5.5</version>
6 </dependency>

Tomcat

复制代码
 1 <plugins>
 2             <!--tomcat插件-->
 3             <plugin>
 4                 <groupId>org.apache.tomcat.maven</groupId>
 5                 <artifactId>tomcat7-maven-plugin</artifactId>
 6                 <version>2.2</version>
 7                 <!--
 8                    通过<configuration>标签中添加(简写访问)
 9                     <port>:指定端口
10                     <path>:指定路径
11                 -->
12                 <configuration>
13                     <port>8080</port>
14                     <path>/</path>
15                 </configuration>
16             </plugin>
复制代码

Servlet

1 <dependencies>
2         <dependency>
3             <groupId>javax.servlet</groupId>
4             <artifactId>javax.servlet-api</artifactId>
5             <version>3.1.0</version>
6             <scope>provided</scope>
7         </dependency>
8     </dependencies>

Mybatis

1 <!--Mybatis-->
2 <dependency>
3    <groupId>org.mybatis</groupId>
4    <artifactId>mybatis</artifactId>
5    <version>3.5.7</version>
6 </dependency>

Spring MVC

1 <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
2 <dependency>
3    <groupId>org.springframework</groupId>
4    <artifactId>spring-webmvc</artifactId>
5    <version>5.3.11</version>
6 </dependency>

AspectJWeaver:AOP

1 <!-- aspectjweaver 面向切面编程-->
2 <dependency>
3    <groupId>org.aspectj</groupId>
4    <artifactId>aspectjweaver</artifactId>
5    <version>1.9.7</version>
6 </dependency>

MyBatis-Spring

1 <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
2 <dependency>
3    <groupId>org.mybatis</groupId>
4    <artifactId>mybatis-spring</artifactId>
5    <version>2.0.6</version>
6 </dependency>

Spring JDBC 

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

spring 注解事务

1 <dependency>
2   <groupId>org.springframework</groupId>
3   <artifactId>spring-tx</artifactId>
4   <version>4.3.9.RELEASE</version>
5 </dependency>

log4j日志处理

1 <dependency>
2     <groupId>org.slf4j</groupId>
3     <artifactId>slf4j-log4j12</artifactId>
4     <version>1.7.25</version>
5 </dependency>
复制代码
 1 <!-- 添加s1f4j日志api --> 
 2 < dependency>
 3 < groupId>org . s1f4j</groupId>
 4 <artifactId>slf4j-api</artifactId>
 5 <version>1.7.20</version>
 6 </dependency>
 7 <!--添加logback-classic依赖 -->
 8 <dependency>
 9 < groupId>ch . qos . logback</groupId>
10 < artifactId>logback-classic< /artifactId>
11 <version>1.2.3< /version> 
12 </ dependency>
13 <!--添加logback-core依赖 --> 
14 <dependency>
15 < groupId>ch. qos. logback< / groupId>
16 < artifactId> logback -core</ artifactId>
17 <version>1.2.3</ version>
18 </ dependency>
复制代码

Servlet 3.1

1 <dependency>
2     <groupId>javax.servlet</groupId>
3     <artifactId>javax.servlet-api</artifactId>
4     <version>3.1.0</version>
5     <scope>provided</scope>
6 </dependency>

Jackson

复制代码
 1 <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
 2 <dependency>
 3    <groupId>com.fasterxml.jackson.core</groupId>
 4    <artifactId>jackson-core</artifactId>
 5    <version>2.13.0</version>
 6 </dependency>
 7 <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
 8 <dependency>
 9    <groupId>com.fasterxml.jackson.core</groupId>
10    <artifactId>jackson-annotations</artifactId>
11    <version>2.13.0</version>
12 </dependency>
13 <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
14 <dependency>
15    <groupId>com.fasterxml.jackson.core</groupId>
16    <artifactId>jackson-databind</artifactId>
17    <version>2.13.0</version>
18 </dependency>
复制代码

Apache POI

复制代码
 1 <dependency>
 2     <groupId>org.apache.poi</groupId>
 3     <artifactId>poi</artifactId>
 4     <version>4.1.2</version>
 5 </dependency>
 6 <dependency>
 7     <groupId>org.apache.poi</groupId>
 8     <artifactId>poi-ooxml</artifactId>
 9     <version>4.1.2</version>
10 </dependency>
11 <dependency>
12     <groupId>org.apache.poi</groupId>
13     <artifactId>poi-ooxml-schemas</artifactId>
14     <version>4.1.2</version>
15 </dependency>
复制代码

javaEE

1     <!--javaee-->
2     <dependency>
3       <groupId>javax</groupId>
4       <artifactId>javaee-api</artifactId>
5       <version>8.0</version>
6       <scope>provided</scope>
7     </dependency>

EL

1 <!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
2 <dependency>
3     <groupId>javax.el</groupId>
4     <artifactId>javax.el-api</artifactId>
5     <version>3.0.0</version>
6 </dependency>

mail jar

复制代码
 1     <!--mail jar-->
 2     <dependency>
 3       <groupId>javax.mail</groupId>
 4       <artifactId>javax.mail-api</artifactId>
 5       <version>1.5.6</version>
 6     </dependency>
 7     <dependency>
 8       <groupId>com.sun.mail</groupId>
 9       <artifactId>javax.mail</artifactId>
10       <version>1.5.6</version>
11     </dependency>
复制代码

 

以上内容均参考各Maven依赖包文章,仅做笔记使用

posted @   Gu_Mi  阅读(105)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示