資源簡介
總結了在網上看到的幾篇ssm教程,希望有一份自己自己的框架能夠隨時使用,并且是最簡單的。所以在這里沒有附加上log4j和junit,需要的同學可衣看其他教程,我這邊就是要搭建一個最簡單的ssm項目,方便以后能夠再次基礎上面進行擴展
當然,前提是要會使用maven。采用idea,因為idea越來越成為主流了。
代碼片段和文件信息
package?com.kevenwu.controller;
import?com.kevenwu.service.CityService;
import?com.kevenwu.service.impl.CityServiceImpl;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.RequestParam;
import?org.springframework.web.servlet.ModelAndView;
import?javax.annotation.Resource;
@Controller
@RequestMapping(“/city“)
public?class?CityController?{
????@Autowired
????private?CityServiceImpl?cityService;
????@RequestMapping(“/getcityname“)
????public?ModelAndView?hello(ModelAndView?mv@RequestParam?String?id){
????????String?name=cityService.getCityName(id);
????????mv.addobject(“cityname“name);
????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????13??2017-08-23?14:13??ssmcreater\.git\COMMIT_EDITMSG
?????文件????????306??2017-08-22?18:10??ssmcreater\.git\config
?????文件?????????73??2017-08-22?18:10??ssmcreater\.git\desc
?????文件?????????23??2017-08-22?18:10??ssmcreater\.git\HEAD
?????文件????????478??2017-08-22?18:10??ssmcreater\.git\hooks\applypatch-msg.sample
?????文件????????896??2017-08-22?18:10??ssmcreater\.git\hooks\commit-msg.sample
?????文件????????189??2017-08-22?18:10??ssmcreater\.git\hooks\post-update.sample
?????文件????????424??2017-08-22?18:10??ssmcreater\.git\hooks\pre-applypatch.sample
?????文件???????1642??2017-08-22?18:10??ssmcreater\.git\hooks\pre-commit.sample
?????文件???????1348??2017-08-22?18:10??ssmcreater\.git\hooks\pre-push.sample
?????文件???????4951??2017-08-22?18:10??ssmcreater\.git\hooks\pre-reba
?????文件????????544??2017-08-22?18:10??ssmcreater\.git\hooks\pre-receive.sample
?????文件???????1239??2017-08-22?18:10??ssmcreater\.git\hooks\prepare-commit-msg.sample
?????文件???????3610??2017-08-22?18:10??ssmcreater\.git\hooks\update.sample
?????文件???????5326??2017-08-23?14:13??ssmcreater\.git\index
?????文件????????240??2017-08-22?18:10??ssmcreater\.git\info\exclude
?????文件????????326??2017-08-23?14:13??ssmcreater\.git\logs\HEAD
?????文件????????326??2017-08-23?14:13??ssmcreater\.git\logs\refs\heads\master
?????文件????????302??2017-08-23?14:14??ssmcreater\.git\logs\refs\remotes\origin\master
?????文件?????????57??2017-08-23?14:13??ssmcreater\.git\ob
?????文件?????????81??2017-08-22?18:10??ssmcreater\.git\ob
?????文件?????????88??2017-08-22?18:10??ssmcreater\.git\ob
?????文件????????362??2017-08-23?14:13??ssmcreater\.git\ob
?????文件????????254??2017-08-22?18:10??ssmcreater\.git\ob
?????文件????????237??2017-08-22?18:10??ssmcreater\.git\ob
?????文件????????780??2017-08-23?14:13??ssmcreater\.git\ob
?????文件????????234??2017-08-22?18:10??ssmcreater\.git\ob
?????文件?????????59??2017-08-23?14:13??ssmcreater\.git\ob
?????文件?????????83??2017-08-22?18:10??ssmcreater\.git\ob
?????文件?????????49??2017-08-23?14:13??ssmcreater\.git\ob
............此處省略241個文件信息
評論
共有 條評論