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

后端 未结 2 1360
伪装坚强ぢ
伪装坚强ぢ 2021-02-19 10:48

I am configuring a database in Spring JPA and I want to know what the possible values are of spring.datasource.initialization-mode. I found this page with common pr

相关标签:
2条回答
  • 2021-02-19 11:14

    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.

    0 讨论(0)
  • 2021-02-19 11:23

    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.

    0 讨论(0)
提交回复
热议问题