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

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

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

asp.net mvc - breakpoint on javascript in CSHTML? -