spring-boot - 启动 spring boot 应用程序,导致 java.lang.RuntimeException
问题描述
我正在为 rds mysql 数据库实现密码管理器。这是一个弹簧启动应用程序。启动时,应用程序抛出以下错误。
WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext.refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc-secretsmanager:mysql://dev-transaction-summary-db.cluster-csuuxb898zxl.us-east-1.rds.amazonaws.com:3306/transaction_summary?serverTimezone=UTC&useSSL=true&serverSslCert=/opt/rds-certs/rds-combined-ca-bundle.pem INFO o.a.catalina.core.StandardService.log - Stopping service [Tomcat] [localhost-startStop-1] WARN o.a.c.loader.WebappClassLoaderBase.log - The web application [ROOT] appears to have started a thread named [java-sdk-http-connection-reaper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Thread.sleep(Native Method)
解决方案
推荐阅读
- angular - 使用 Ionic ion-infinite-scroll 作为子级(Ionic 4)测试任何组件时出错
- json - apache NiFi 将 JSON 转换为 avro
- python - 如何在python中一起添加到列表中的整数?
- python - 是否可以在 selenium 中拦截 websocket 流量?
- python - 如何在 2 个主题中划分 videoCapture 以在 opencv 中更快地处理视频?
- sql - 无法创建名为“delete”的数据库?
- php - 如何从mysql发送图像作为附件
- oracle - 针对 Oracle Server 生产场景的硬件建议
- python - 如何使用 Flask 连接服务器数据库?
- linux - 将 xargs 输出格式化为 grep