您的位置:首页 > 其它

RBAC从零开始--安装IntelliJ IDEA和构建项目

2017-10-26 21:52 176 查看
  IntelliJ IDEA是一款java集成开发环境,之前用的是Eclipse,但是Eclipse对JS支持的不够友好,之后就开始用IntelliJ IDEA

下载最新版本的IntelliJ IDEA:IDEA下载地址,下载旗舰版(2017),打开需要注册码:注册码地址,记得修改hosts文件(C盘->Windows->System32->drivers->etc->hosts)

安装JDK,省略

安装maven(记得配置环境变量),省略

安装tomcat(记得配置环境变量),省略

打开IntelliJ IDEA:



点击Create New Project:



选择安装的JDK版本,选择Maven,勾选Create from archetype

,选择maven-archetype-webapp,next



GroupId和ArtifactId表示坐标,通过它们可以保证项目的唯一性,GroupId表示域名,ArtifactId表示项目名



选择安装maven路径,可以修改setting.xml中本地仓库的路D:\repository\maven

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<localRepository>D:\repository\maven</localRepository>

<!-- interactiveMode
| This will determine whether maven prompts you when it needs input. If set to false,
| maven will use a sensible default value, perhaps based on some other setting, for
| the parameter in question.
|
| Default: true
<interactiveMode>true</interactiveMode>
-->


除本地仓库外还有一个中央仓库(Maven Repository),获取Jar的时候先从本地仓库去找所需要的Jar,如果本地仓库没有就会到中央仓库寻找(根据GroupId/ArchetypeId/Version找),下载到本地仓库,next



finish,等IntelliJ IDEA构建项目完毕!

在main文件夹下新建一个java文件夹和test文件夹,之后右击java文件夹->Mark Directory as->Resources Root(变蓝),右击test文件夹->Mark Directory as->Test sources Root(原谅色)



安装IntelliJ IDEA和构建项目完毕,接下来就是利用maven来获取开发所需的依赖(Jar)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  idea RBAC 构建项目