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 1515 */
1616package issues .gh324 .spring ;
1717
18- import issues .gh324 .NameTableMapper ;
1918import org .apache .ibatis .session .SqlSessionFactory ;
2019import org .mybatis .spring .SqlSessionFactoryBean ;
21- import org .mybatis .spring .mapper . MapperFactoryBean ;
20+ import org .mybatis .spring .annotation . MapperScan ;
2221import org .springframework .context .annotation .Bean ;
2322import org .springframework .context .annotation .Configuration ;
2423import org .springframework .jdbc .datasource .DataSourceTransactionManager ;
2928import javax .sql .DataSource ;
3029
3130@ Configuration
31+ @ MapperScan ("issues.gh324" )
3232public class TestConfiguration {
3333 @ Bean
3434 public DataSource dataSource () {
@@ -46,14 +46,6 @@ public SqlSessionFactory sqlSessionFactory() throws Exception {
4646 return factoryBean .getObject ();
4747 }
4848
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-
5749 @ Bean
5850 public PlatformTransactionManager platformTransactionManager () {
5951 return new DataSourceTransactionManager (dataSource ());
You can’t perform that action at this time.
0 commit comments