mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48:24 +08:00
mybatis-flex-solon-plugin:当有 mapperLocations 配置又没有相关注册时,改为 warn 日志(之前为异常)
This commit is contained in:
parent
f02b8857d1
commit
c80284ef68
@ -25,6 +25,8 @@ import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.core.AppContext;
|
||||
import org.noear.solon.core.event.EventBus;
|
||||
import org.noear.solon.core.util.ResourceUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.InputStream;
|
||||
@ -37,6 +39,8 @@ import java.lang.reflect.Proxy;
|
||||
*/
|
||||
@Configuration
|
||||
public class MybatisFlexAutoConfiguration {
|
||||
private static final Logger log = LoggerFactory.getLogger(MybatisFlexAutoConfiguration.class);
|
||||
|
||||
private DataSource getDataSource() {
|
||||
return MybatisFlexBootstrap.getInstance().getDataSource();
|
||||
}
|
||||
@ -159,7 +163,7 @@ public class MybatisFlexAutoConfiguration {
|
||||
|
||||
//如果有配置,但是没有 mapper 注册成功;说明有问题了
|
||||
if (flexConfiguration.getMapperRegistry().getMappers().size() == 0) {
|
||||
throw new IllegalStateException("Missing mapper registration, please check the 'mapperLocations' configuration!");
|
||||
log.warn("Missing mapper registration, please check the 'mapperLocations' configuration!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user