• 大小: 12.26MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-29
  • 语言: 其他
  • 标签: ssm  bbs  

资源简介

一个简单的SSM框架写的BBS小项目 实现了登陆,注册。写博客。评论。等功能

资源截图

代码片段和文件信息

package com.liv587.controller;

import java.lang.ProcessBuilder.Redirect;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

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

import com.liv587.pojo.Comment;
import com.liv587.pojo.Essay;
import com.liv587.service.EssayService;

@Controller
@RequestMapping(“/Essay“)
public class EssayCntroller {

@Autowired
private EssayService es;


  
  
@RequestMapping(“/saveEssay“)
public String  savaEssay(HttpSession session String title  String context){
Integer uid = (Integer) session.getAttribute(“uid“);
String username = (String) session.getAttribute(“username“);
Essay e = new Essay();
e.setU_id(uid);
e.setAuthor(username);
e.settitle(title);
e.setContext(context);
es.savaEssay(e);
 
return “success“;

}

@RequestMapping(“/getEssay“)
public String  getEssay(HttpServletRequest requestModel model){

String eid =  request.getParameter(“eid“);
Essay e =es.getEssay(Integer.parseInt(eid));
model.addAttribute(“e“ e);



return “essayDetail“;

}

@RequestMapping(“/apply“)
public String  apply(Integer eidString commentHttpSession session){

String username = (String) session.getAttribute(“username“);

Comment c = new Comment();
c.setComment(comment);
c.setUsername(username);
c.setE_id(eid);

es.addComment(c);


return  “forward:/Essay/getEssay.action“;

}






}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-18 15:44  ssm_bbs\
     文件         772  2018-06-04 10:41  ssm_bbs\.classpath
     文件        1040  2018-04-18 15:38  ssm_bbs\.project
     目录           0  2018-05-10 08:56  ssm_bbs\.settings\
     文件         567  2018-04-18 15:38  ssm_bbs\.settings\.jsdtscope
     文件         229  2018-05-12 23:48  ssm_bbs\.settings\org.eclipse.core.resources.prefs
     文件         364  2018-04-18 15:38  ssm_bbs\.settings\org.eclipse.jdt.core.prefs
     文件         550  2018-04-18 15:44  ssm_bbs\.settings\org.eclipse.wst.common.component
     文件         305  2018-06-03 19:41  ssm_bbs\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-04-18 15:38  ssm_bbs\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-04-18 15:38  ssm_bbs\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-04-18 15:38  ssm_bbs\build\
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\
     文件        2076  2018-04-09 20:06  ssm_bbs\build\classes\ApplicationContext-dao.xml
     文件        1079  2018-04-11 15:36  ssm_bbs\build\classes\ApplicationContext-service.xml
     文件        1858  2018-04-09 20:10  ssm_bbs\build\classes\ApplicationContext-trans.xml
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\com\
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\controller\
     文件        2875  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\controller\EssayCntroller.class
     文件        1933  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\controller\LoginController.class
     文件        4483  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\controller\MassageCntroller.class
     文件        2772  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\controller\UserController.class
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\converter\
     文件        1142  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\converter\CustomGlobalStrToDateConverter.class
     目录           0  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\dao\
     文件         395  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\dao\EssayMapper.class
     文件        2490  2018-05-13 15:41  ssm_bbs\build\classes\com\liv587\dao\EssayMapper.xml
     文件         735  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\dao\MassageMapper.class
     文件        1704  2018-05-13 15:26  ssm_bbs\build\classes\com\liv587\dao\MassageMapper.xml
     文件         582  2018-06-04 15:03  ssm_bbs\build\classes\com\liv587\dao\UserMapper.class
............此处省略121个文件信息

评论

共有 条评论