File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/test/java/issues/gh324/spring Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package issues .gh324 .spring ;
17
17
18
- import issues .gh324 .NameTableMapper ;
19
18
import org .apache .ibatis .session .SqlSessionFactory ;
20
19
import org .mybatis .spring .SqlSessionFactoryBean ;
21
- import org .mybatis .spring .mapper . MapperFactoryBean ;
20
+ import org .mybatis .spring .annotation . MapperScan ;
22
21
import org .springframework .context .annotation .Bean ;
23
22
import org .springframework .context .annotation .Configuration ;
24
23
import org .springframework .jdbc .datasource .DataSourceTransactionManager ;
29
28
import javax .sql .DataSource ;
30
29
31
30
@ Configuration
31
+ @ MapperScan ("issues.gh324" )
32
32
public class TestConfiguration {
33
33
@ Bean
34
34
public DataSource dataSource () {
@@ -46,14 +46,6 @@ public SqlSessionFactory sqlSessionFactory() throws Exception {
46
46
return factoryBean .getObject ();
47
47
}
48
48
49
- @ Bean
50
- public MapperFactoryBean <NameTableMapper > nameTableMapper () throws Exception {
51
- MapperFactoryBean <NameTableMapper > factory = new MapperFactoryBean <>();
52
- factory .setMapperInterface (NameTableMapper .class );
53
- factory .setSqlSessionFactory (sqlSessionFactory ());
54
- return factory ;
55
- }
56
-
57
49
@ Bean
58
50
public PlatformTransactionManager platformTransactionManager () {
59
51
return new DataSourceTransactionManager (dataSource ());
You can’t perform that action at this time.
0 commit comments