parent
179e44bac0
commit
9c3c368a53
@ -0,0 +1,22 @@
|
||||
package com.controller.admin;
|
||||
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.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.po.Auser;
|
||||
import com.service.admin.AdminService;
|
||||
@Controller
|
||||
public class AdminController {
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
@RequestMapping("/admin")
|
||||
public String toLogin(@ModelAttribute Auser auser) {
|
||||
return "admin/login";
|
||||
}
|
||||
@RequestMapping("admin/login")
|
||||
public String login(@ModelAttribute Auser auser, Model model, HttpSession session) {
|
||||
return adminService.login(auser, model, session);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue