mybatis类图
2017-06-14 14:33:55 0 举报
mybatis spring 类图
作者其他创作
大纲/内容
实现
创建
DefaultSqlSessionFactory
-configuration:Configuration
+ openSession():SqlSession
依赖关系
builder
MethodSignature
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ convertArgsToSqlCommandParam(args):Object+ returnsVoid():boolean+ hasResultHandler():boolean+ returnsMany():boolean+ returnsMap():boolean
DaoSupport
+ afterPropertiesSet()#checkDaoConfig()#initDao()
MapperFactoryBean
- mapperInterface:Class+ addToConfig:boolean=true
#checkDaoConfig() 依赖+getObject():T+getObjectType:Class +isSingleton():boolean
MapperScannerConfigurer
- basePackage:String
+postProcessBeanFactory(ConfigurableListableBeanFactory)+postProcessBeanDefinitionRegistry(BeanDefinitionRegistry)
SqlSessionFactory
泛化关系
依赖
Configuration
#mapperRegistry:MapperRegistry = new MapperRegistry(this)
MapperProxy
SqlSessionFactoryBean
- dataSource:DataSource- mapperLocations:Resource[]- plugins:Interceptor[]- sqlSessionFactoryBuilder:SqlSessionFactoryBuilder
+afterPropertiesSet()+buildSqlSessionFactory():SqlSessionFactory
SqlSessionTemplate
+sqlSessionProxy:SqlSession-executorType:ExecutorType-sqlSessionFactory:SqlSessionFactory
MapperRegistry
SqlSessionFactoryBuilder
+build(Reader):SqlSessionFactory+build(Configuration):SqlSessionFactory
SqlCommand
- name:String- type:SqlCommandType
FactoryBean
+getObject():T+getObjectType:Class+isSingleton():boolean
MapperProxyFactory
- mapperInterface:Class
+ newInstance(sqlSession):T
InvocationHandler
SqlSessionInterceptor
实现关系
关联关系1..*
mapperInterface+MapperProxy代理
所有Dao Mapper的代理类
InitializingBean
+ afterPropertiesSet()
ClassPathMapperScanner
+doScan(basePackages):Set
BeanFactoryPostProcessor
+postProcessBeanFactory(ConfigurableListableBeanFactory)
ClassPathBeanDefinitionScanner
- registry:BeanDefinitionRegistry
BeanDefinitionRegistryPostProcessor
+postProcessBeanDefinitionRegistry(BeanDefinitionRegistry)
SqlSessionDaoSupport
- sqlSession:SqlSession-externalSqlSession:boolean
+setSqlSessionFactory(SqlSessionFactory)+setSqlSessionTemplate(SqlSessionTemplate)#checkDaoConfig()+getSqlSession():SqlSession
MapperMethod
- command:SqlCommand- method:MethodSignature
creater
收藏
收藏
0 条评论
下一页
为你推荐
查看更多