首页>代码>spring 3.0+spring MVC+Hibernate框架搭建教程(附:springMVC文件上传功能)>/hellomvc30/src/com/hello/web/UserController.java
package com.hello.web;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hello.exceptions.MyException;
import com.hello.service.UserService;
@Controller
@RequestMapping("/user.do")
public class UserController {
@Resource
private UserService userService;
@RequestMapping(params="method=register")
public String register(String nickname,String password) throws MyException {
System.out.println("HelloController.handleRequest()");
userService.userAdd(nickname, password);
return "index";
}
public UserService getUserService() {
return userService;
}
public void setUserService(UserService userService) {
this.userService = userService;
}
}
最近下载更多
mudingc木钉 LV30
2021年6月11日
15281682932 LV9
2021年4月9日
alphastar LV6
2020年1月2日
三生石sh1 LV13
2019年1月8日
dingdehong LV10
2018年12月27日
wang512237140 LV20
2018年12月20日
牧羊犬 LV6
2018年11月22日
luomazkf LV15
2018年8月28日
李佳恒 LV8
2018年6月23日
xk9587 LV16
2018年6月11日

最近浏览