package com.ssm.controller;

import com.ssm.entity.Category;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
    @Controller
    @RequestMapping("sjh")
    public class CategoryController {
        @RequestMapping("Category")
        public ModelAndView test(Category category) {
            category.printInfo();
            System.out.println("类目信息:" + category.toString());
            ModelAndView cc = new ModelAndView("showCategory");
            cc.addObject("printInfo", category);
            return cc;
        }
    }

