Class SqlSessionFactoryBean

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.ibatis.session.SqlSessionFactory buildSqlSessionFactory​(java.io.File configFile)  
      org.apache.ibatis.session.SqlSessionFactory getObject()
      Return an instance (possibly shared or independent) of the object managed by this factory.
      void initialize()
      Invoke on initialization after it has set all bean properties supplied.
      void setApplicationAdapter​(ApplicationAdapter applicationAdapter)  
      void setConfigLocation​(java.lang.String configLocation)
      Set the location of the MyBatis SqlSessionFactory config file.
      void setEnvironment​(java.lang.String environment)  
      void setProperties​(java.util.Properties properties)
      Set optional properties to be passed into the SqlSession configuration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SqlSessionFactoryBean

        public SqlSessionFactoryBean()
    • Method Detail

      • setConfigLocation

        public void setConfigLocation​(java.lang.String configLocation)
        Set the location of the MyBatis SqlSessionFactory config file.
        Parameters:
        configLocation - the location of the MyBatis SqlSessionFactory config file
      • setEnvironment

        public void setEnvironment​(java.lang.String environment)
      • setProperties

        public void setProperties​(java.util.Properties properties)
        Set optional properties to be passed into the SqlSession configuration.
        Parameters:
        properties - the optional properties
      • buildSqlSessionFactory

        protected org.apache.ibatis.session.SqlSessionFactory buildSqlSessionFactory​(java.io.File configFile)
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Description copied from interface: InitializableBean
        Invoke on initialization after it has set all bean properties supplied.
        Specified by:
        initialize in interface InitializableBean
        Throws:
        java.lang.Exception - if initialization fails
      • getObject

        public org.apache.ibatis.session.SqlSessionFactory getObject()
        Description copied from interface: FactoryBean
        Return an instance (possibly shared or independent) of the object managed by this factory. As with a BeanFactory, this allows support for both the Singleton and Prototype design pattern.
        Specified by:
        getObject in interface FactoryBean<org.apache.ibatis.session.SqlSessionFactory>
        Returns:
        an instance of the bean (can be null)