Skip to content
Snippets Groups Projects
Commit a3a1f4ca authored by tluutho's avatar tluutho
Browse files

add profiles [dev|prod]

add filters
parent c7b2eb68
No related branches found
No related tags found
No related merge requests found
......@@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hbp.mip</groupId>
<artifactId>mip</artifactId>
<artifactId>backend-services</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mip</name>
<description>Medical Informatics Platform</description>
<name>backend-services</name>
<description>Medical Informatics Platform : backend restful services</description>
<parent>
<groupId>org.springframework.boot</groupId>
......@@ -23,6 +23,31 @@
<java.version>1.8</java.version>
</properties>
<profiles>
<profile>
<id>dev</id>
<properties>
<connection.driver_class>org.h2.Driver</connection.driver_class>
<connection.url>jdbc:h2:mem:test</connection.url>
<connection.username>root</connection.username>
<connection.password>root</connection.password>
<hibernate.dialect>org.hibernate.dialect.H2Dialect</hibernate.dialect>
<schema.deploy>true</schema.deploy>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<connection.driver_class>org.postgresql.Driver</connection.driver_class>
<connection.url>jdbc:postgresql://portaldb:5432/postgres</connection.url>
<connection.username>postgres</connection.username>
<connection.password>test</connection.password>
<hibernate.dialect>org.hibernate.dialect.PostgreSQL82Dialect</hibernate.dialect>
<schema.deploy>false</schema.deploy>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
......@@ -102,7 +127,17 @@
</dependencies>
<build>
<finalName>mip</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes><include>**/*.xml</include></includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes><include>**/*.csv</include></includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......@@ -115,6 +150,9 @@
<executions>
<execution>
<phase>compile</phase>
<configuration>
<skip>${schema.deploy}</skip>
</configuration>
<goals>
<goal>export</goal>
</goals>
......
......@@ -5,13 +5,13 @@
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql://portaldb:5432/postgres</property>
<property name="connection.username">postgres</property>
<property name="connection.password">test</property>
<property name="connection.driver_class">${connection.driver_class}</property>
<property name="connection.url">${connection.url}</property>
<property name="connection.username">${connection.username}</property>
<property name="connection.password">${connection.password}</property>
<property name="hibernate.format_sql">true</property>
<property name="connection.pool_size">1</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL82Dialect</property>
<property name="hibernate.dialect">${hibernate.dialect}</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.show_sql">false</property>
......
db @ f14bdedd
Subproject commit f14bdeddf4e4c3a7af9271e8637ee064282da6a0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment