init
This commit is contained in:
28
web/eclipse.md
Normal file
28
web/eclipse.md
Normal file
@@ -0,0 +1,28 @@
|
||||
#### eclipse导入Web项目
|
||||
1. 右键 -> import -> General -> Existing Projects inot Workspace
|
||||
2. 选择项路径,导入成功
|
||||
|
||||
#### 配置JDK(以jdk1.8为例)
|
||||
1. 右键项目 -> Propertis -> Java Build Path
|
||||
2. Libraries 中是项目所有的依赖,显示红叉的remove掉。
|
||||
3. JRE System Library 和 Server Library 都remove掉
|
||||
4. Add Library -> JRE System Library -> Alternate JRE 选择jdk1.8。如果没有,选择 Installed JRES...,选择本机jdk1.8的安装路径(需要先安装jdk1.8)
|
||||
5. 选完finish就ok了
|
||||
|
||||
#### 配置Java Compiler
|
||||
1. 右键项目 -> Propertis -> Java Compiler
|
||||
2. Compiler compliance level -> 1.8
|
||||
|
||||
#### 配置Tomcat
|
||||
1. Window -> Preference -> Runtime Environments -> Add
|
||||
2. 选择 Apache -> Apache Tomcat v8.0
|
||||
3. 选择tomcat安装路径,JRE选择1.8
|
||||
4. eclipse配置tomcat就ok了,还需要配置到项目中
|
||||
5. 右键项目 -> Propertis -> Java Build Path -> Libraries
|
||||
6. Add Library -> Server Runtime -> 选择刚才配置好的tomcat就ok了
|
||||
|
||||
#### 运行项目
|
||||
1. 导入好数据库脚本
|
||||
2. 修改项目中数据库连接的用户名和密码
|
||||
3. 右键项目 -> Run As -> Run on Server 选择Tomcat8运行
|
||||
4. 访问 `http://localhost:8080/项目名/`
|
||||
Reference in New Issue
Block a user