第一個springmvc例子
主要目的是熟悉intellij的web項目操作和springmvc的基本概念
具體操作如下:
1.建立intellij idea web module
然後填寫module名 點選确認 module建立完畢
2.在module的web-web-inf下建立 classes和lib檔案夾
2.修改項目的配置 點選file->project struture 修改modules下的paths 修改完畢點選ok
3.配置tomcat 點選run->edit configurations
點綠色的十字圖示 建立tomcat并配置
4.首先配置web.xml
5.配置mvc-servelet
6.在jsp目錄下建立hello.jsp
7.在src中編寫controller類
最後進行測試
第一個小demo到此結束!