Skip to content

HikariDataSource cannot be initialized at application startup #19596

@MrXionGe

Description

@MrXionGe

Spring Boor version: 2.2.2.RELEASE

HikariCP version: 3.4.1

Now, I only initialize the database connection when the application is accessed.
If the database connection has errors, I can't find the problem quickly.
I tried some methods and still can't solve it.

E.g

    @Bean
    public LazyInitializationExcludeFilter excludeFilter() {
        return LazyInitializationExcludeFilter.forBeanTypes(HikariDataSource.class);
    }

E.g

spring:
  main:
    lazy-initialization: false

I have two apps with this problem now. One of them runs on JDK8 and the other runs on JDK13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions