代码拉取完成,页面将自动刷新
环境变量
MAVEN_HOME:maven文件目录
M2_HOME:maven下bin文件目录
阿里云maven镜像:https://developer.aliyun.com/mvn/guide
windows 机器一般在 maven 安装目录的 conf/settings.xml ,或者C:\Users\zh-gaos\.m2
在标签中添加 mirror 子节点:
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
public仓库是central仓和jcenter仓的聚合仓
勾选“create from archetype“使用maven模板
一般选择maven-archetype-webapp选项
GroupId和ArtifactId
GroupId和ArtifactId被统称为“坐标”,是为了保证项目唯一性而提出的,GroupId组织标识,Artifactid项目标识。
在源码中,标记文件夹功能
常用依赖:
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.12</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。