在Controller 层使用 @RequestMapping注解,需要导入的包:spring-webmvc。

在类中需要添加:import org.springframework.web.bind.annotation.RequestMapping;

 

本文参考了:http://www.cnblogs.com/JavaTechLover/archive/2012/09/03/spring-controller2.html 

里面有详细的讲解!

posted on 2017-07-06 11:28  JAVA_STUDYER  阅读(23460)  评论(0)    收藏  举报