1.new project ---- maven ,不使用模板
2.enable autoimport ----- 自动导包
3.前面不是web项目,现在添加web支持
add frameworks support 添加框架支持
选择 web applicaiton – create web.xml
代码
代码 资源 (配置) 测试 web部分是前端页面
4.让web项目跑起来,tomcat部署配置
点 edit configuration + ------tomcat server–local —deployment部署—artifacter
注意,这里是jdk,不是jre
5.引入spring的jar包
6.
将maven所依赖的jar包,全都添加的项目中来,为以后打包部署做准备
7.在pomxml里面,右键,找到create setting。xml。复制
alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/groups/public/
central
uk
central
Human Readable Name for this Mirror.
http://uk.maven.org/maven2/
CN
OSChina Central
http://maven.oschina.net/content/groups/public/
central
nexus
internal nexus repository
http://repo.maven.apache.org/maven2
central
或者直接在pom.xml里面加入这个
maven-ali http://maven.aliyun.com/nexus/content/groups/public// true true always fail原来需要半个多小时下载,现在十几秒钟。
8.
手动添加spring文件夹,和spring-mvc。xml文件