1、启动报日志错误(SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".),不影响应用运行,但没有了日志。加入slf4j-simple的依赖即可。原因是slf4j在一定版本后就不再内置日志实现类了,需要自行指定:

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.30</version>
            <scope>compile</scope>
        </dependency>

 2、依赖冲突会导致一些莫名其妙的问题,一些组件是有依赖关系的,而且版本最好能匹配上:

  baomidou的:mybatis-plus-boot-starter、mybatis-plus版本保持一样;dynamic-datasource-spring-boot-starter保持与前者相近

  springframework.boot的spring-boot-starter-parent,其他springframework的东西如非必要,最好别引用,比如spring-jdbc,会被mybatis-plus-boot-starter引用,如必须引用,注意两者的版本。

 

相关文章:

  • 2021-07-18
  • 2021-06-07
  • 2021-04-29
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-14
  • 2021-09-06
  • 2022-12-23
  • 2022-01-27
  • 2021-07-05
  • 2022-12-23
相关资源
相似解决方案