首页>代码>Spring MVC集成Mybatis实现基础的增删改查Demo实例>/springMVC_Mybatis_Test/src/com/ssm/dao/MyBatisDao.java
package com.ssm.dao;

import java.io.Serializable;
import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;


public class MyBatisDao extends SqlSessionDaoSupport{
	
	public void save(String key, Object object) {
		getSqlSession().insert(key, object);
	}
	
	public void delete(String key, Serializable id) {
		getSqlSession().delete(key, id);
	}

	public void delete(String key, Object object) {
		getSqlSession().delete(key, object);
	}
	
	public <T> T get(String key, Object params) {
		return getSqlSession().selectOne(key, params);
	}
	
	public <T> List<T> getList(String key) {
		return getSqlSession().selectList(key);
	}
	
	public <T> List<T> getList(String key, Object params) {
		return getSqlSession().selectList(key, params);
	}
}
最近下载更多
it_star  LV6 2023年10月31日
李亮  LV19 2023年8月29日
zhumeng168  LV5 2023年7月8日
1257592068  LV6 2023年6月13日
小妹妹  LV7 2023年5月22日
微信网友_6248713511227392  LV11 2022年12月5日
谢谢谢谢谢谢你  LV6 2022年7月19日
 LV6 2021年12月22日
9843637  LV9 2021年12月12日
543666826  LV34 2021年11月19日
最近浏览更多
可是不知道么  LV23 3月29日
微信网友_7316199114199040 2024年12月28日
暂无贡献等级
三秋桂子  LV1 2024年12月22日
气之子dss  LV4 2024年6月24日
qq970040477  LV24 2024年6月16日
xin xie  LV1 2024年6月13日
wwwww816  LV5 2023年12月19日
xiongwei11231  LV9 2023年12月6日
it_star  LV6 2023年10月31日
李亮  LV19 2023年8月29日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友