记一次更新服务MySQLTimeoutException(表数据量较大增加列执行超时所致)

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table consumer_cart add column goods_no integer not null]

记一次更新服务MySQLTimeoutException(表数据量较大增加列执行超时所致)

解决方案:

更新服务前,先进行sql脚本操作!!!

然后再更新服务!!!!!!