IDEA中Maven管理下添加mysql依赖
时间:2021-07-01 10:21:17
帮助过:3人阅读
xml version="1.0" encoding="UTF-8"?>
<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.0
</modelVersion>
<groupId>com.suixue
</groupId>
<artifactId>example
</artifactId>
<version>1.0-SNAPSHOT
</version>
<dependencies>
<dependency> <!-- junit 4.7 -->
<groupId>junit
</groupId>
<artifactId>junit
</artifactId>
<version>4.11
</version>
<type>jar
</type>
<scope>test
</scope>
</dependency>
<dependency> <!-- spring 3.2 -->
<groupId>org.springframework
</groupId>
<artifactId>spring-context
</artifactId>
<version>4.1.6.RELEASE
</version>
<type>jar
</type>
</dependency>
<dependency>
<groupId>log4j
</groupId>
<artifactId>log4j
</artifactId>
<version>1.2.17
</version>
<type>jar
</type>
</dependency>
<dependency> <!--Jackson核心包-->
<groupId>com.fasterxml.jackson.core
</groupId>
<artifactId>jackson-core
</artifactId>
<version>2.2.1
</version>
</dependency>
<dependency> <!--Jackson数据绑定包-->
<groupId>com.fasterxml.jackson.core
</groupId>
<artifactId>jackson-databind
</artifactId>
<version>2.1.3
</version>
</dependency>
<dependency> <!--Jackson注解包-->
<groupId>com.fasterxml.jackson.core
</groupId>
<artifactId>jackson-annotations
</artifactId>
<version>2.1.2
</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
</dependency>
</dependencies>
</project>
红色区域就是添加mysql依赖的代码哦,若版本不一样,可以再version中进行更改。
添加依赖后,IDEA就会自动为我们下载需要的jar包了哦!
IDEA中Maven管理下添加mysql依赖
标签: