异常信息:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '***Controller': Unsatisfied dependency expressed through field '***Service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***Service': Invocation of init method failed; nested exception is org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction [See nested exception: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction]
解决办法:
SELECT * FROM information_schema.INNODB_TRX WHERE trx_state = 'LOCK WAIT';
找出线程ID【 trx_mysql_thread_id】,然后杀线程:KILL (查到的线程ID);