MVC3查看控制器

时间:2014-04-16 07:25:39

标签: jsp spring-mvc

嘿我需要将我的表单连接到控制器我该怎么做Spring MVC?

<form method="get"   action="customer">
                 <input type="text" value="default" /> <input type="submit" value="search"/> 
                 </form> 

这是我的控制器

 @Controller
@RequestMapping(value = "/customer")
public class CustomerController {
    private static final Logger logger = LoggerFactory.getLogger(OrderManagementController.class);

@Autowired
private OMPCamundaBridge ompCamundaBridge;

@RequestMapping( value="/customerlist",method= RequestMethod.GET)
public ModelAndView dummylist()
{
    return new ModelAndView ()

任何帮助都将受到高度赞赏

1 个答案:

答案 0 :(得分:0)

您需要 modelAttribute 属性才能使绑定生效。 见http://www.javacodegeeks.com/2013/04/spring-mvc-form-tutorial.html