Spring Boot conditonally enable DataSourceAutoConfiguration based on system property -


i have following dependency in project , have @springbootapplication in main class spring-boot-starter-data-jpa
there way conditionally enable spring boot datasourceautoconfiguration class based when env property/system property present.

thanks

it appears if define property "spring.datasource.initialize" false, initialization logic skipped.

if @ datasourceautoconfiguration definition, loads in configuration properties...

enter image description here

that datasourceproperties has attribute named "initialize", , appears referenced in datasourceinitializer default implementation...

enter image description here

i read being able use property skip datasource initialization.

hope helps


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -