package com.ssm.controller;

import com.ssm.entity.Carousel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("nihao")
public class CarouselController {
    @RequestMapping("Carousel")
    public ModelAndView test(Carousel carousel){
        carousel.printInfo();
        System.out.println("轮播信息:"+carousel.toString());
        ModelAndView mv = new ModelAndView("showCarousel");
        mv.addObject("printInfo", carousel);
        return mv;
    }
}
