org.mybatis.spring.annotation
Class InternalMapperFactoryBean<T>
java.lang.Object
org.mybatis.spring.MapperFactoryBean<T>
org.mybatis.spring.annotation.InternalMapperFactoryBean<T>
- All Implemented Interfaces:
- org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean
public class InternalMapperFactoryBean<T>
- extends MapperFactoryBean<T>
MapperScannerPostProcessor
registers new mappers creating new MapperFactoryBean
s
but if there are other MapperFactoryBean
s defined in the context their
bean definitions are created before the MapperScannerPostProcessor
is executed.
It seems that the MapperFactoryBean
's bean definition created by the MapperScannerPostProcessor
is not the same that the one created by Spring. That makes autowire fail and an
exception will be thrown indicating that sqlSessionFactory property is null and its required.
Seems that the problem is solved if another factory bean class is registered
because bean definitions will be different and will not collide.
So this class just extends MapperFactoryBean
and does nothing more.
This class is only for the MapperScannerPostProcessor
and should never be used by final users.
- Version:
- $Id: InternalMapperFactoryBean.java 2965 2010-10-30 14:43:51Z simone.tripodi $
- See Also:
MapperFactoryBean
,
MapperScannerPostProcessor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalMapperFactoryBean
public InternalMapperFactoryBean()
Copyright © 2010 MyBatis.org. All Rights Reserved.