首页>代码>Spring+Spring MVC+MyBatis实现SSM框架整合详细教程>/shengke/src/main/java/com/shq/service/impl/UserService.java
package com.shq.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.shq.dao.Tb_userMapper; import com.shq.pojo.Tb_user; import com.shq.service.IUserService; /** * @author 作者:Shengke * @date 创建时间:2015年11月26日 下午1:54:44 * @version 1.0 */ @Service("userService") public class UserService implements IUserService { @Resource private Tb_userMapper userDao; public Tb_user getUserById(int userId) { // TODO Auto-generated method stub return this.userDao.selectByPrimaryKey(userId); } }