Ver Fonte

优化MapperScan

zhouhao há 6 anos atrás
pai
commit
c8c5b7bf16

+ 3 - 1
hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/src/main/java/org/hswebframework/web/dao/mybatis/MybatisDaoAutoConfiguration.java

@@ -38,7 +38,9 @@ import java.util.Set;
 
 @Configuration
 @ComponentScan("org.hswebframework.web.dao.mybatis")
-@MapperScan(value = "org.hswebframework.web.dao", markerInterface = Dao.class)
+@MapperScan(value = "org.hswebframework.web.dao"
+        , markerInterface = Dao.class
+        ,sqlSessionFactoryRef = "sqlSessionFactory")
 @AutoConfigureAfter(MyBatisAutoConfiguration.class)
 @EnableConfigurationProperties(MybatisProperties.class)
 public class MybatisDaoAutoConfiguration {