Maven是工具,Spring是第三方框架
maven相当于iOS 的cocoapod,把一些第三方加载至本地,项目添加第三方先从本地检索
Spring相当于iOS中的AFNetworking等框架,
只不过这里spring太庞大功能太全
书写格式为:
1.在pom.xml里面进行添加<dependencies></dependencies>标签,
2.在<dependencies>里面添加一个为<dependency></dependency>标签
3.比如我要添加org.springframework.spring-context,
就需要分为两段书写,将org.springframework分为一段,spring-context分为一段
这两段分别放在<groupId></groupId>和<artifactId></artifactId>标签里面,最后还要配置版本
完整如下
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.13.RELEASE</version>
</dependency>
添加多个依赖就是
<dependencies>
<dependency>....</dependency>
<dependency>....</dependency>
</<dependencies>>
名词解释如下:
groupid和artifactId被统称为“坐标”是为了保证项目唯一性而提出的,如果你要把你项目弄到maven本地仓库去,你想要找到你的项目就必须根据这两个id去查找。
参考链接:
https://blog.csdn.net/bo1040679875/article/details/78364385