Currently I have a SBA (Spring Boot App 1.5.10.RELEASE) which has two configuration property files like application-default.properties
and application-oracle.properties
. Furthermore those files are located in src/main/resources
they end up in the resulting jar file in BOOT-INF/classes/
The applilcation-oracle.properties
contains something like this:
#
# Turn off liquibase initialization.
spring.liquibase.enabled=false
# Oracle settings
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/xe
spring.datasource.username=..
spring.datasource.password=...
spring.datasource.driver-class-name=...
#
# Hibernate
spring.jpa.properties.hibernate.dialect=....
#
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.properties.hibernate.use_sql_comments=true
spring.jpa.properties.hibernate.format_sql=true
The application-default.properties
looks similar except for spring.liquibase.enabled
which is not contained and contains a connection to a local PostgreSQL instead of Oracle.
I have a dependency to liquibase in my pom file.
So now I would like to start my SBA simply via:
java -jar x.jar --spring.profiles.active=default ..
which prints out as expected that liquibase initialization is running.. afterwards I would like to start it like this:
java -jar x.jar --spring.profiles.active=oracle ..
and expected that the inialization via liquibase will not happen based on the given spring.liquibase.enabled=false
but in contradiction to my expectation it will start the initialization via liquibase.
So the question is: Did I oversight something ?