spring.datasource.initialize is deprecated

Vinay Prajapati :

I have a springboot application where I am trying to add following to application.properties file

spring.datasource.initialize=false

When I add this I see a warning as below:

enter image description here

I tried finding out what's the new property that replaces this deprecated property but in vain.

Can anybody help on this!

Having a reference to a migration guide would be great.

soorapadman :

As per the document

Spring Boot automatically creates the schema of an embedded DataSource. This behaviour can be customized by using the spring.datasource.initialization-mode property. For instance, if you want to always initialize the DataSource regardless of its type:

spring.datasource.initialization-mode=always

Look at this migration guide

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=89754&siteId=1