-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: documentationA documentation updateA documentation update
Description
Tested with Spring Boot 3.3.1
I was investigating creating an OCI image of a Spring Boot application using both AOT and CDS to create a container with reduced start up time with a JVM, without the additional complexity of building a native image.
This was fine with a do-nothing application using Spring Web, but it fails when you have Flyway as a dependency.
The training run to build the CDS archive does not honour the disabling of Flyway migration (presumably due to being built into the AOT generated classes), so you get the following build error:
[creator] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer': Unable to obtain connection from database: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
[creator] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[creator] SQL State : 08001
[creator] Error Code : 0
[creator] Message : Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
It would be good to have the dual benefits of AOT processing and CDS training when building an OCI image.
Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: documentationA documentation updateA documentation update