1.首先 安裝IDEAhtml
2.配置nexus ,來實現 Maven對項目 包的引用,發佈。web
在配置過程當中spring
http://192.168.10.38:8081/nexus/content/groups/public/apache
setting.xml配置好後,必定要加上激活配置服務器
<profiles> <profile> <id>central-repos</id> <repositories> <repository> <id>central</id> <name>Central</name> <url>http://192.168.10.38:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> <profile> <id>dev</id> <repositories> <repository> <id>central</id> <name>Central</name> <url>http://192.168.10.38:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
3.spring 相關配置mvc
3.1 新建 Maven 項目,框架選擇:org.apache.maven.archetypes:maven-archetype-webappapp
因爲maven骨架和一些jar須要去maven的倉庫下載,因此建立項目的時候速度會很是慢(外國的服務器你懂得),所以咱們能夠直接訪問http://repo1.maven.org/maven2/archetype-catalog.xml,把這個xml下載下來放到本地的maven目錄中,而後在添加一個參數archetypeCatalog=internal就能夠了。框架
3.2 在web.xml中添加 org.springframework.web.servlet.DispatcherServlet 配置,webapp
並設置並指定beans 配置文件所在目錄,maven
web.xml
<servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:config/springmvc-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <display-name>Archetype Created Web Application</display-name>
3.3 配置Tomcat
http://www.cnblogs.com/Sinte-Beuve/p/5730553.html#servlet容器的配置和運行