File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
main/java/org/mybatis/spring
test/java/org/mybatis/spring Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2010 The myBatis Team
2
+ * Copyright 2010-2011 The myBatis Team
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -115,7 +115,7 @@ public void setTypeAliasesPackage(String typeAliasesPackage) {
115
115
}
116
116
117
117
/**
118
- * Set type handlers. They must be annotated with {@code MappedTypes}
118
+ * Set type handlers. They must be annotated with {@code MappedTypes} and optionally with {@code MappedJdbcTypes}
119
119
*
120
120
* @since 1.0.1
121
121
*
@@ -126,7 +126,7 @@ public void setTypeHandlers(TypeHandler[] typeHandlers) {
126
126
}
127
127
128
128
/**
129
- * List of type aliases to register
129
+ * List of type aliases to register. They can be annotated with {@code Alias}
130
130
*
131
131
* @since 1.0.1
132
132
*
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2010 The myBatis Team
2
+ * Copyright 2010-2011 The myBatis Team
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
18
18
import java .sql .SQLException ;
19
19
20
+ import org .apache .ibatis .plugin .Interceptor ;
20
21
import org .apache .ibatis .session .SqlSessionFactory ;
21
22
22
23
import org .springframework .core .io .ClassPathResource ;
@@ -63,11 +64,11 @@ public static void setupBase() throws Exception {
63
64
factoryBean .setMapperLocations (new Resource [] { new ClassPathResource ("org/mybatis/spring/TestMapper.xml" ) });
64
65
// note running without SqlSessionFactoryBean.configLocation set => default configuration
65
66
factoryBean .setDataSource (dataSource );
67
+ factoryBean .setPlugins (new Interceptor [] {executorInterceptor });
66
68
67
69
exceptionTranslator = new MyBatisExceptionTranslator (dataSource , true );
68
70
69
71
sqlSessionFactory = factoryBean .getObject ();
70
- sqlSessionFactory .getConfiguration ().addInterceptor (executorInterceptor );
71
72
72
73
txManager = new DataSourceTransactionManager (dataSource );
73
74
}
You can’t perform that action at this time.
0 commit comments