Skip to content

Commit 2a20f8e

Browse files
committed
Minor change to test also new setPlugins method
1 parent 96a624f commit 2a20f8e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
*

src/test/java/org/mybatis/spring/AbstractMyBatisSpringTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.
@@ -17,6 +17,7 @@
1717

1818
import java.sql.SQLException;
1919

20+
import org.apache.ibatis.plugin.Interceptor;
2021
import org.apache.ibatis.session.SqlSessionFactory;
2122

2223
import 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
}

0 commit comments

Comments
 (0)