记一次springboot启动项目阻塞问题

springboot启动项目卡在mybatis-plus init success下没有任何报错信息

问题

  • springboot启动项目卡在log4j:WARN Please initialize the log4j system properly.
  • log4j:WARN Please initialize the log4j system properly.上是mybatis-plus init success信息
  • 没有任何报错信息

原因

mybatis-plus插件启动的时候会访问数据库,如果数据库连接不上,就会一直阻塞,卡着tomcat线程启动不了,并且没有任何提醒信息、报错信息

解决方法

确认mysql数据库可访问