File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
src/main/java/org/mybatis/spring/mapper Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 4
4
/.project
5
5
* .epoch
6
6
* .log
7
+ * .iml
8
+ /.idea
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ private void processBeanDefinitions(Set<BeanDefinitionHolder> beanDefinitions) {
177
177
178
178
// the mapper interface is the original class of the bean
179
179
// but, the actual class of the bean is MapperFactoryBean
180
- definition .getPropertyValues ().add ( "mapperInterface" , definition .getBeanClassName ());
180
+ definition .getConstructorArgumentValues ().addGenericArgumentValue ( definition .getBeanClassName ());
181
181
definition .setBeanClass (MapperFactoryBean .class );
182
182
183
183
definition .getPropertyValues ().add ("addToConfig" , this .addToConfig );
Original file line number Diff line number Diff line change @@ -58,7 +58,15 @@ public class MapperFactoryBean<T> extends SqlSessionDaoSupport implements Factor
58
58
59
59
private boolean addToConfig = true ;
60
60
61
- /**
61
+
62
+ public MapperFactoryBean (Class <T > mapperInterface ) {
63
+ this .mapperInterface = mapperInterface ;
64
+ }
65
+
66
+ public MapperFactoryBean () {
67
+ }
68
+
69
+ /**
62
70
* Sets the mapper interface of the MyBatis mapper
63
71
*
64
72
* @param mapperInterface class of the interface
You can’t perform that action at this time.
0 commit comments