异常
在线上环境启动tomcat没有报错,卡在 ConnectionProviderFactory: Initializing connection provider 处。
2022-05-10 08:57:46 [INFO] Configuration: Hibernate Validator not found: ignoring
2022-05-10 08:57:46 [INFO] DefaultTraversableResolver: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
2022-05-10 08:57:46 [INFO] AnnotationSessionFactoryBean: Building new Hibernate SessionFactory
2022-05-10 08:57:46 [INFO] DefaultTraversableResolver: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
2022-05-10 08:57:46 [INFO] DefaultTraversableResolver: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
2022-05-10 08:57:47 [INFO] HibernateSearchEventListenerRegister: Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
2022-05-10 08:57:47 [INFO] ConnectionProviderFactory: Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
原因
经过仔细查探,代码没有任何问题。原来是连接数据库的配置文件中的连接参数仍然是本地数据库,而非线上数据库。
解决
把所有的本地数据库连接参数全部换成线上的。
|