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.

22 lines
783 B

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);
}
}