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 11/*
2- * Copyright 2010 The myBatis Team
2+ * Copyright 2010-2011 The myBatis Team
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -115,7 +115,7 @@ public void setTypeAliasesPackage(String typeAliasesPackage) {
115115 }
116116
117117 /**
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}
119119 *
120120 * @since 1.0.1
121121 *
@@ -126,7 +126,7 @@ public void setTypeHandlers(TypeHandler[] typeHandlers) {
126126 }
127127
128128 /**
129- * List of type aliases to register
129+ * List of type aliases to register. They can be annotated with {@code Alias}
130130 *
131131 * @since 1.0.1
132132 *
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2010 The myBatis Team
2+ * Copyright 2010-2011 The myBatis Team
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1717
1818import java .sql .SQLException ;
1919
20+ import org .apache .ibatis .plugin .Interceptor ;
2021import org .apache .ibatis .session .SqlSessionFactory ;
2122
2223import org .springframework .core .io .ClassPathResource ;
@@ -63,11 +64,11 @@ public static void setupBase() throws Exception {
6364 factoryBean .setMapperLocations (new Resource [] { new ClassPathResource ("org/mybatis/spring/TestMapper.xml" ) });
6465 // note running without SqlSessionFactoryBean.configLocation set => default configuration
6566 factoryBean .setDataSource (dataSource );
67+ factoryBean .setPlugins (new Interceptor [] {executorInterceptor });
6668
6769 exceptionTranslator = new MyBatisExceptionTranslator (dataSource , true );
6870
6971 sqlSessionFactory = factoryBean .getObject ();
70- sqlSessionFactory .getConfiguration ().addInterceptor (executorInterceptor );
7172
7273 txManager = new DataSourceTransactionManager (dataSource );
7374 }
You can’t perform that action at this time.
0 commit comments