package com.ssm.controller;

import com.ssm.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
//请求处理器
@Controller
@RequestMapping("nihao")
public class UserController {
    @RequestMapping("User")
    public ModelAndView test(User user){
        user.printInfo();
        System.out.println("用户信息:"+user.toString());
        ModelAndView mv = new ModelAndView("showUser");
        mv.addObject("printInfo", user);
        return mv;
    }
}
