依赖管理
使用坐标导入jar包
1、在pom.xml 中编写 <dependencies> 标签
2、在 <dependencies> 标签中使用 <dependency> 引入坐标
3、定义坐标的 groupId, artifactId, version
4、点击刷新按钮,使坐标生效
依赖范围
- 通过设置坐标的依赖范围(scope),可以设置对应 jar 包的作用范围:编译环境、测试环境、运行环境
- <scope> 默认值 compile
1、在pom.xml 中编写 <dependencies> 标签
2、在 <dependencies> 标签中使用 <dependency> 引入坐标
3、定义坐标的 groupId, artifactId, version
4、点击刷新按钮,使坐标生效