Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot's Script-based Initialization doesn't work #7922

Closed
emeraldhieu opened this issue Dec 10, 2023 · 1 comment
Closed

Spring Boot's Script-based Initialization doesn't work #7922

emeraldhieu opened this issue Dec 10, 2023 · 1 comment
Labels

Comments

@emeraldhieu
Copy link

emeraldhieu commented Dec 10, 2023

Module

PostgreSQL

Testcontainers version

1.17.6

Using the latest Testcontainers version?

Yes

Host OS

MacOS

Host Arch

x86

Docker version

Docker version 24.0.6

What happened?

Spring Boot's Script-based Initialization that requires "schema.sql" on the classpath doesn't work.

spring:
  jpa:
    hibernate:
      ddl-auto: create-drop
  sql:
    init:
      mode: always

I've had "schema.sql" in the classpath but the test doesn't seem to recognize the file.

See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-initialize-a-database-using-spring-jdbc

Relevant log output

No response

Additional Information

No response

@eddumelendez
Copy link
Member

Hi, you should report this in the spring boot project and attach a project that reproduces the issue.

@eddumelendez eddumelendez closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants