You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
XYSH/NavigateController

40 lines
1.2 KiB

package com.controller.before;
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.po.Buser;
import com.service.before.NavigateService;
@Controller
public class NavigateController extends BaseBeforeController{
@Autowired
private NavigateService navigateService;
/**
* 转到写信页面
*/
@RequestMapping("/toWrite")
public String toWrite(Model model) {
return navigateService.toWrite(model);
}
/***
* 安全退出不需访问数据库这里不需要service层和dao层
*/
@RequestMapping("/exit")
public String exit(HttpSession session, Model model) {
session.invalidate();
model.addAttribute("buser", new Buser());
return "before/login";
}
/***
* 去修改密码页面不需访问数据库这里不需要service层和dao层
*/
@RequestMapping("/toUpdate")
public String toUpdate(HttpSession session, Model model) {
model.addAttribute("buser", (Buser)session.getAttribute("emailuser"));
return "before/update";
}
}