首页>代码>spring 3.0+spring MVC+Hibernate框架搭建教程(附:springMVC文件上传功能)>/hellomvc30/src/com/hello/service/impl/UserServiceImpl.java
package com.hello.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hello.dao.UserDao;
import com.hello.entity.User;
import com.hello.exceptions.MyException;
import com.hello.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Resource
	private UserDao userDao;
	
	public void userAdd(String nickname,String password) throws MyException {
		User user=new User();
		user.setUname(nickname);
		user.setPwd(password);
		userDao.add(user);
		System.out.println("service userAdd OK ");
	}
	
	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}
最近下载更多
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日
最近浏览更多
WBelong  LV7 2023年12月11日
flygrass  LV12 2023年12月7日
星辰xc  LV2 2023年5月7日
1642172710  LV2 2022年12月13日
getset  LV8 2022年12月4日
sharon_taozi  LV1 2021年11月5日
gshnbb  LV9 2021年6月16日
mudingc木钉  LV30 2021年6月11日
1973356987  LV13 2021年6月9日
Vera.Wu  LV2 2021年5月30日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友