2022/5/18 上午9:06:20Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022/5/18 上午9:06:202022-05-18 09:06:20.811 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter -
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20***************************
2022/5/18 上午9:06:20APPLICATION FAILED TO START
2022/5/18 上午9:06:20***************************
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20Description:
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20Field properties in com.xyidc.config.CheckDataSourceConfig required a bean of type 'com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties' that could not be found.
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20Action:
2022/5/18 上午9:06:20
2022/5/18 上午9:06:20Consider defining a bean of type 'com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties' in your configuration.
使用mybatis的时候,由于系统中使用多数据源,就需要自己配置mybatis的sqlsession,后期加上对查询的特殊字符的管理,启动的时候报错,
处理方法,在配置类上添加配置
@EnableConfigurationProperties(MybatisPlusProperties.class)
@Configuration
@MapperScan(basePackages = {"com.xyidc.mapper"}, sqlSessionFactoryRef = "sqlSessionFactory")
@Slf4j
@EnableConfigurationProperties(MybatisPlusProperties.class)
public class CheckDataSourceConfig {
.....
}