Skip to content

Commit

Permalink
Move liquibase credentials to pom.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
pavankjadda committed Jun 22, 2020
1 parent 59a7c63 commit 100a9a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
22 changes: 10 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<liquibase-hibernate5.version>3.10.0</liquibase-hibernate5.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<javassist.version>3.27.0-GA</javassist.version>
<jaxb-api.version>2.4.0-b180830.0359</jaxb-api.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -93,26 +94,20 @@
</activation>
<properties>
<activatedProfile>dev</activatedProfile>
<db.username>root</db.username>
<db.password>test1234</db.password>
</properties>
</profile>

<profile>
<id>test</id>
<properties>
<activatedProfile>test</activatedProfile>
<db.username>root</db.username>
<db.password>test1234</db.password>
</properties>
</profile>

<profile>
<id>prod</id>
<properties>
<activatedProfile>prod</activatedProfile>
<db.username>root</db.username>
<db.password>test1234</db.password>
</properties>
</profile>
</profiles>
Expand All @@ -133,13 +128,12 @@
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase-maven-plugin.version}</version>
<configuration>
<url>jdbc:mysql://localhost:3306/liquibasedemo?serverTimezone=UTC</url>
<username>root</username>
<password>bcmc1234</password>
<referenceUrl>hibernate:spring:com.liquibasedemo.model?dialect=org.hibernate.dialect.MySQLDialect&amp;diffChangeLogFile=src/main/resources/db/db.changelog-master.xml</referenceUrl>
<url>${liquibase.url}</url>
<username>${liquibase.username}</username>
<password>${liquibase.password}</password>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>src/main/resources/db/db.changelog-master.xml</changeLogFile>
<diffChangeLogFile>src/main/resources/db/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<outputChangeLogFile>src/main/resources/db/changelog/${maven.build.timestamp}_changelog.xml</outputChangeLogFile>
<logging>info</logging>
</configuration>

Expand Down Expand Up @@ -170,7 +164,11 @@
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 0 additions & 10 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ spring:
devtools:
restart:
enabled: true
liquibase:
contexts: dev
change-log: classpath:db/db.changelog-master.xml
user: ${spring.datasource.username}
password: ${spring.datasource.password}
url: ${spring.datasource.url}
enabled: true



## Server Properties
server:
Expand All @@ -39,4 +30,3 @@ management:
endpoint:
auditevents:
enabled: true

5 changes: 5 additions & 0 deletions src/main/resources/liquibase.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#url=jdbc:mysql://localhost:3306/liquibasedemo-dev?serverTimezone=UTC
#username=root
#password=bcmc1234
driver=com.mysql.cj.jdbc.Driver
referenceUrl=hibernate:spring:com.pj.liquibasedemo.domain?dialect=org.hibernate.dialect.MySQL8Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy

0 comments on commit 100a9a1

Please sign in to comment.