public abstract class SqlSessionDaoSupport
extends org.springframework.dao.support.DaoSupport
This class needs a SqlSessionTemplate or a SqlSessionFactory. If both are set the SqlSessionFactory will be ignored.
{code Autowired} was removed from setSqlSessionTemplate and setSqlSessionFactory in version 1.2.0.
setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)
,
setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)
,
SqlSessionTemplate
Constructor and Description |
---|
SqlSessionDaoSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDaoConfig() |
org.apache.ibatis.session.SqlSession |
getSqlSession()
Users should use this method to get a SqlSession to call its statement methods
This is SqlSession is managed by spring.
|
void |
setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) |
void |
setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) |
public void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate)
public org.apache.ibatis.session.SqlSession getSqlSession()
protected void checkDaoConfig()
checkDaoConfig
in class org.springframework.dao.support.DaoSupport
Copyright © 2010–2015 MyBatis.org. All rights reserved.