资源简介

该资源用于搭建最基本的SSM框架。下载后直接导入工程,并可执行resource中的init.sql插入测试数据即可验证。

资源截图

代码片段和文件信息

package com.test.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.test.pojo.TestPojo;
import com.test.service.ITestService;

@Controller
@RequestMapping(value = “/testController“)
public class TestController {

@Resource(name = “testService“)
ITestService testService;

@RequestMapping(value = “/toTestPage“)
public object test(Model model){
try {
model.addAttribute(“msg“ “访问该接口,可获得此参数,并前往test.jsp界面“);
TestPojo pojo = testService.getTestPojo();
model.addAttribute(“pojo“ pojo);
} catch (Exception e) {
model.addAttribute(“msg“ “获取数据失败。“);
model.addAttribute(“pojo“ null);
}
return “test“;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-01-29 18:17  ssmDemo\
     文件         775  2018-01-29 11:05  ssmDemo\.classpath
     文件        1040  2018-01-29 09:23  ssmDemo\.project
     目录           0  2018-01-29 18:17  ssmDemo\.settings\
     文件         567  2018-01-29 09:23  ssmDemo\.settings\.jsdtscope
     文件         118  2018-01-29 18:08  ssmDemo\.settings\org.eclipse.core.resources.prefs
     文件         364  2018-01-29 09:23  ssmDemo\.settings\org.eclipse.jdt.core.prefs
     文件         553  2018-01-29 10:50  ssmDemo\.settings\org.eclipse.wst.common.component
     文件         305  2018-01-29 09:23  ssmDemo\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-01-29 09:23  ssmDemo\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-01-29 09:23  ssmDemo\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-01-29 18:17  ssmDemo\build\
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\controller\
     文件        1366  2018-01-29 17:16  ssmDemo\build\classes\com\test\controller\TestController.class
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\dao\
     文件         161  2018-01-29 17:16  ssmDemo\build\classes\com\test\dao\ITestDao.class
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\mapping\
     文件         677  2018-01-29 16:09  ssmDemo\build\classes\com\test\mapping\TestMapping.xml
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\pojo\
     文件        1725  2018-01-29 17:16  ssmDemo\build\classes\com\test\pojo\TestPojo.class
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\service\
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\service\impl\
     文件         703  2018-01-29 17:16  ssmDemo\build\classes\com\test\service\impl\TestServiceImpl.class
     文件         173  2018-01-29 17:16  ssmDemo\build\classes\com\test\service\ITestService.class
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\com\test\test\
     文件        1059  2018-01-29 18:05  ssmDemo\build\classes\com\test\test\MainTest.class
     目录           0  2018-01-29 18:17  ssmDemo\build\classes\init\
     文件         739  2018-01-29 15:19  ssmDemo\build\classes\init\init.sql
............此处省略83个文件信息

评论

共有 条评论