mybatis扫描点亮业务包

This commit is contained in:
Vinjor 2024-07-31 13:36:30 +08:00
parent bd6cdd958e
commit ffa2aa024e

View File

@ -22,7 +22,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
* @author 芋道源码
*/
@AutoConfiguration(before = MybatisPlusAutoConfiguration.class) // 目的先于 MyBatis Plus 自动配置避免 @MapperScan 可能扫描不到 Mapper 打印 warn 日志
@MapperScan(value = "${yudao.info.base-package}", annotationClass = Mapper.class,
@MapperScan(basePackages ={"${yudao.info.base-package}","com.dianliang"}, annotationClass = Mapper.class,
lazyInitialization = "${mybatis.lazy-initialization:false}") // Mapper 懒加载目前仅用于单元测试
public class YudaoMybatisAutoConfiguration {