Skip to content

Commit 0c7747f

Browse files
committed
Profiles fixed
1 parent 482290a commit 0c7747f

File tree

2 files changed

+38
-21
lines changed

2 files changed

+38
-21
lines changed

pom.xml

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,42 @@
2424
<java.version>1.8</java.version>
2525
</properties>
2626

27+
<profiles>
28+
29+
<profile>
30+
<id>prod</id>
31+
<activation>
32+
<activeByDefault>true</activeByDefault>
33+
</activation>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.springframework.boot</groupId>
37+
<artifactId>spring-boot-starter-tomcat</artifactId>
38+
<scope>provided</scope>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.postgresql</groupId>
43+
<artifactId>postgresql</artifactId>
44+
<version>9.4.1212.jre7</version>
45+
</dependency>
46+
47+
</dependencies>
48+
</profile>
49+
50+
<profile>
51+
<id>dev</id>
52+
<dependencies>
53+
<dependency>
54+
<groupId>com.h2database</groupId>
55+
<artifactId>h2</artifactId>
56+
</dependency>
57+
58+
</dependencies>
59+
</profile>
60+
61+
</profiles>
62+
2763
<dependencies>
2864
<dependency>
2965
<groupId>org.springframework.boot</groupId>
@@ -40,11 +76,6 @@
4076
<artifactId>spring-boot-starter-data-jpa</artifactId>
4177
</dependency>
4278

43-
<dependency>
44-
<groupId>com.h2database</groupId>
45-
<artifactId>h2</artifactId>
46-
</dependency>
47-
4879
<dependency>
4980
<groupId>org.projectlombok</groupId>
5081
<artifactId>lombok</artifactId>
@@ -65,21 +96,6 @@
6596

6697
</dependencies>
6798

68-
<profiles>
69-
70-
<profile>
71-
<id>prod</id>
72-
<dependencies>
73-
<dependency>
74-
<groupId>org.springframework.boot</groupId>
75-
<artifactId>spring-boot-starter-tomcat</artifactId>
76-
<scope>provided</scope>
77-
</dependency>
78-
</dependencies>
79-
</profile>
80-
81-
</profiles>
82-
8399
<build>
84100
<plugins>
85101
<plugin>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
spring.datasource.url = jdbc:postgresql://${RDS_HOSTNAME}:${RDS_PORT}/${RDS_DB_NAME}
22
spring.datasource.username = ${RDS_USERNAME}
33
spring.datasource.password = ${RDS_PASSWORD}
4-
spring.jpa.hibernate.ddl-auto = update
4+
spring.datasource.driverClassName = org.postgresql.Driver
5+
spring.jpa.hibernate.ddl-auto = update

0 commit comments

Comments
 (0)