日期:2014-05-17 浏览次数:20860 次
<context:component-scan base-package="com.mtea.mis.controller" /> <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"> <property name="caseSensitive" value="true" /> </bean> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/view/" p:suffix=".jsp" p:viewClass="org.springframework.web.servlet.view.JstlView" />
@Controller public class UserTypeController { @Resource private UserTypeService userTypeService; @RequestMapping public List<UserType> list() { return userTypeService.geAll(); } @RequestMapping("/input/{id}") public String input(@PathVariable("id") int id,Model model) { model.addAttribute(userTypeService.getByAutoId(id)); return "userType/input"; }