What are the possible values of spring.datasource.initialization-mode? What are the possible values of spring.datasource.initialization-mode? spring spring

What are the possible values of spring.datasource.initialization-mode?


When all else fails, you remember "use the source, Luke!". The values are given in the Javadoc of the enum DataSourceInitializationMode. Values are always, embedded and never.


Forgive me for butting in almost a year late. After having faced a similar problem as explained by Christine, I decided to take the clue and begin searching in the source. It would appear that the following is detailed in the link here https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/jdbc/DataSourceInitializationMode.html :

Enum Constant Summary Enum Constants

Enum Constant and Description

ALWAYS Always initialize the datasource.

EMBEDDED Only initialize an embedded datasource.

NEVER Do not initialize the datasource.