【发布时间】:2021-10-16 04:20:59
【问题描述】:
我有一个连接到 Oracle 数据库的 Spring Boot 应用程序。每当我启动应用程序时都会建立连接:
Started KanbanApplication in 8.487 seconds (JVM running for 11.153)
不错...我可以忍受这么长时间的创业。但是当我想连接到我拥有的其他 Oracle 用户时,启动时间会急剧增加:
Started KanbanApplication in 67.124 seconds (JVM running for 68.904)
加载时间最长的部分在这两个加载区域之间:
HHH000400: Using dialect: org.hibernate.dialect.Oracle12cDialect
大约过了一分钟,终于加载完成了:
HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
Initialized JPA EntityManagerFactory for persistence unit 'default'
spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
Tomcat started on port(s): 8080 (http) with context path ''
Started KanbanApplication in 67.124 seconds (JVM running for 68.904)
我希望我能给你更多关于用户连接组成的细节,但在我看来这两种模式是完全一样的。相同的表,基本上没有数据,等等。如何提高 Spring Boot 应用程序连接到 Oracle 数据库用户的速度?每次我需要重新编译我的应用程序时,我都等不及了。
【问题讨论】:
-
请您的 DBA 跟踪您的会话
标签: oracle spring-boot hibernate spring-data-jpa