ssm个人博客源码html,ssm个人博客,包括登录注册,前端后台功能全面完整

package neusoft.controller.admin;

import javax.annotation.Resource;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import neusoft.pojo.Blogger;

import org.springframework.stereotype.Controller;

import org.springframework.ui.Model;

import org.springframework.validation.BindingResult;

import org.springframework.validation.FieldError;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.multipart.MultipartFile;

import neusoft.service.BloggerService;

import neusoft.util.DateUtil;

import neusoft.util.ResponseUtil;

import net.sf.json.JSONObject;

import java.io.File;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

@Controller

@RequestMapping("/admin/blogger")

public class BloggerAdminController {

@Resource

private BloggerService bloggerService;

@RequestMapping("/save")

public String save(@RequestParam("imageFile") MultipartFile imageFile, Blogger blogger, Model model,

BindingResult br, HttpServletRequest request, HttpServletResponse response)throws Exception{

if(!imageFile.isEmpty()){

String filePath=request.getServletContext().getRealPath("/");

String imageName=DateUtil.getCurrentDateStr()+"."+imageFile.getOriginalFilename().split("\\.")[1];

imageFile.transferTo(new File(filePath+"static/userImages/"+imageName));

blogger.setImageName(imageName);

}

System.out.println(blogger);

boolean resultTotal=bloggerService.update(blogger);

System.out.println(resultTotal);

StringBuffer result=new StringBuffer();

if(resultTotal){

result.append("");

}else{

result.append("");

}

ResponseUtil.write(response, result);

return null;

}

@RequestMapping("/find")

public String find(HttpServletResponse response, int id)throws Exception{

Blogger blogger=bloggerService.getById(id);

JSONObject jsonObject=JSONObject.fromObject(blogger);

ResponseUtil.write(response, jsonObject);

return null;

}

@RequestMapping("/modifyPassword")

public String modifyPassword(String newPassword, int id, HttpServletResponse response)throws Exception{

Blogger blogger=new Blogger();

blogger.setPassword(newPassword);

blogger.setId(id);

System.out.println(blogger.getPassword());

System.out.println(blogger.getId());

//blogger.setPassword(CryptographyUtil.md5(newPassword, "programmer.ischoolbar.com"));

boolean resultTotal=bloggerService.update(blogger);

JSONObject result=new JSONObject();

if(resultTotal){

result.put("success", true);

}else{

result.put("success", false);

}

ResponseUtil.write(response, result);

return null;

}

@RequestMapping("/logout")

public String logout()throws Exception{

//SecurityUtils.getSubject().logout();

return "redirect:../../login.jsp";

}

@RequestMapping("/indexout")

public String indexout()throws Exception{

//SecurityUtils.getSubject().logout();

return "redirect:../index.html";

}

}

个人博客系统主要用于发表个人博客,记录个人生活日常,学习心得,技术分享等,供他人浏览,查阅,评论等。本系统结构如下: (1)博主端: 登录模块:登入后台管理系统:首先进入登录页面,需要输入账号和密码。它会使用Shiro进行安全管理,对前台输入的密 码进行加密运算,然后与数据库中的进行比较。成功后才能登入后台系统。 博客管理模块: 博客管理功能分为写博客和博客信息管理。写博客是博主用来发表编写博客的,需要博客标题,然后选择博 客类型,最后将博客内容填入百度的富文本编辑器中,点击发布博客按钮即可发布博客。 博客类别管理模块:博主类别管理系统可以添加,修改和删除博客类型名称和排序序号。将会显示到首页的按日志类别区域。 游客可以从这里查找相关的感兴趣的博客内容 评论信息管理模块:评论管理功能分为评论审核和评论信息管理两部分。评论审核是当有游客或自己发表了评论之后,博主需 要在后台管理系统中审核评论。若想将此评论显示在页面上则点击审核通过,否则点击审核不通过。 个人信息管理模块:修改博主的个人信息,可以修改昵称,个性签名,可以添加个人头像,修改个人简介; 系统管理功能模块:友情链接管理,修改密码,刷新系统缓存和安全退出,友情链接管理可以添加,修改,删除友情链接网址 (2)游客端: 查询博客: 查询具体哪一篇博客 查看博客内容: 查看博客内容 查看博主个人信息:查看博主个人简介 发表评论: 可以评论具体某篇博客 友情链接: 查看友情链接
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值