mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 08:38:26 +08:00
mybatis-flex-solon-plugin:当有 mapperLocations 配置又没有相关注册时,改为 warn 日志(之前为异常)
This commit is contained in:
parent
c80284ef68
commit
536f4f6058
@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
/**
|
||||
* Mybatis-Flex 自动装配
|
||||
@ -39,7 +38,7 @@ import java.lang.reflect.Proxy;
|
||||
*/
|
||||
@Configuration
|
||||
public class MybatisFlexAutoConfiguration {
|
||||
private static final Logger log = LoggerFactory.getLogger(MybatisFlexAutoConfiguration.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MybatisFlexAutoConfiguration.class);
|
||||
|
||||
private DataSource getDataSource() {
|
||||
return MybatisFlexBootstrap.getInstance().getDataSource();
|
||||
@ -163,7 +162,9 @@ public class MybatisFlexAutoConfiguration {
|
||||
|
||||
//如果有配置,但是没有 mapper 注册成功;说明有问题了
|
||||
if (flexConfiguration.getMapperRegistry().getMappers().size() == 0) {
|
||||
log.warn("Missing mapper registration, please check the 'mapperLocations' configuration!");
|
||||
if (LOGGER.isWarnEnabled()) {
|
||||
LOGGER.warn("Property 'mapperLocations' was specified but matching resources are not found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user