eclipse+maven+spring mvc项目基本搭建过程

网友投稿 400 2022-12-27


eclipse+maven+spring mvc项目基本搭建过程

环境

操作系统

windows10

JDK

jdk1.8.0_192

IDE

Eclipse IDE for Enterprise java Developers.

Version: 2019-06 (4.12.0) Build id: 20190614-1200

目录结构

构建

1.配置settings.xml

创建一个settings.xml文件,复制下列代码到文件中

xmlns:xsi="http://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">

D:\DxOffice\repository

nexus-aliyun

*

Nexus aliyun

http://maven.aliyun.com/nexus/content/groups/public

xmlns:xsi="http://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">

D:\DxOffice\repository

nexus-aliyun

*

Nexus aliyun

http://maven.aliyun.com/nexus/content/groups/public

配置

Window -> Preferences

Maven -> User Settings -> User Settings ->Browse...->Apply and Close

2.创建Maven项目

File -> New ->Maven Project(/Other...->Maven Project -> Next)

Next

org.apache.maven.archetypes maven-archetype-webapp 1 .0->Next

Group Id、Artifact Id、Version、Package -> Finish

3.修改JRE

Build Path

Configure Build Path...

Libraries -> JRE System Library -> Edit

Workspace default JRE ->Finish

4.配置pom.xml

修改内代码如下

mysql

mysql-connector-java

8.0.17

javax.servlet.jsp

jsp-api

2.2

provided

commons-io

commons-io

2.6

commons-fileupload

commons-fileupload

1.4

com.alibaba

fastjson

1.2.59

jstl

jstl

1.2

junit

junit

4.11

test

javax.servlet

javax.servlet-api

3.1.0

javax.servlet.jsp

javax.servlet.jsp-api

2.3.1

org.springframework

spring-webmvc

4.3.11.RELEASE

org.springframework

spring-jdbc

4.3.11.RELEASE

内添加,代码如下

org.eclipse.jetty

jetty-maven-plugin

9.3.7.v20160115

8081

/${project.artifactId}

/image

D:\DxOffice\workspace\image

UTF-8

10

org.apache.tomcat.maven

tomcat7-maven-plugin

2.2

/${project.artifactId}

8080

UTF-8

${project.artifactId}

tomcat7

org.apache.maven.plugins

maven-compiler-plugin

3.7.0

1.8

1.8

UTF-8

5.主目录结构搭建

M

model

V

view

C

controller

service

总结


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:app api测试工具(APP测试软件)
下一篇:亚马逊接口测试工具怎么用(亚马逊验证器)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~