File tree 5 files changed +36
-37
lines changed
5 files changed +36
-37
lines changed Original file line number Diff line number Diff line change 44
44
<version >5.6.15.Final</version >
45
45
</dependency >
46
46
<dependency >
47
- <groupId >mysql </groupId >
48
- <artifactId >mysql-connector-java </artifactId >
49
- <version >${mysql .version} </version >
47
+ <groupId >org.postgresql </groupId >
48
+ <artifactId >postgresql </artifactId >
49
+ <version >${postgresql .version} </version >
50
50
</dependency >
51
51
<dependency >
52
52
<groupId >org.flywaydb</groupId >
53
- <artifactId >flyway-mysql</artifactId >
54
- <version >${flyway-maven-plugin.version} </version >
53
+ <artifactId >flyway-database-postgresql</artifactId >
54
+ <version >11.0.1</version >
55
+ <scope >runtime</scope >
55
56
</dependency >
56
57
<dependency >
57
58
<groupId >org.projectlombok</groupId >
69
70
<showLogs >true</showLogs >
70
71
<images >
71
72
<image >
72
- <name >mysql: ${mysql.version} </name >
73
+ <name >postgres:15-alpine </name >
73
74
<run >
74
75
<ports >
75
- <port >3306:3306 </port >
76
+ <port >5432:5432 </port >
76
77
</ports >
77
78
<env >
78
- <MYSQL_DATABASE >db</MYSQL_DATABASE >
79
- <MYSQL_ROOT_PASSWORD >some_password</MYSQL_ROOT_PASSWORD >
80
- <MYSQL_USER >user</MYSQL_USER >
81
- <MYSQL_PASSWORD >password</MYSQL_PASSWORD >
79
+ <POSTGRES_DB >person-db</POSTGRES_DB >
80
+ <POSTGRES_USER >person-user</POSTGRES_USER >
81
+ <POSTGRES_PASSWORD >person-password</POSTGRES_PASSWORD >
82
82
</env >
83
83
<wait >
84
- <log >starting as process 1 </log >
84
+ <log >database system is ready to accept connections </log >
85
85
<time >20000</time >
86
86
</wait >
87
87
</run >
Original file line number Diff line number Diff line change 5
5
6
6
<hibernate-configuration >
7
7
<session-factory >
8
- <property name =" hibernate.connection.driver_class" >com.mysql.cj.jdbc .Driver</property >
9
- <property name =" hibernate.connection.url" >jdbc:mysql ://127.0.0.1:3306/db?allowPublicKeyRetrieval=true & useSSL=false </property >
10
- <property name =" hibernate.connection.username" >root </property >
11
- <property name =" hibernate.connection.password" >some_password </property >
12
- <property name =" hibernate.dialect" >org.hibernate.dialect.MySQLDialect </property >
8
+ <property name =" hibernate.connection.driver_class" >org.postgresql .Driver</property >
9
+ <property name =" hibernate.connection.url" >jdbc:postgresql ://127.0.0.1:5432/person-db </property >
10
+ <property name =" hibernate.connection.username" >person-user </property >
11
+ <property name =" hibernate.connection.password" >person-password </property >
12
+ <property name =" hibernate.dialect" >org.hibernate.dialect.PostgreSQLDialect </property >
13
13
<property name =" show_sql" >true</property >
14
14
<property name =" hibernate.id.new_generator_mappings" >false</property >
15
15
Original file line number Diff line number Diff line change 26
26
<version >5.6.15.Final</version >
27
27
</dependency >
28
28
<dependency >
29
- <groupId >mysql </groupId >
30
- <artifactId >mysql-connector-java </artifactId >
31
- <version >${mysql .version} </version >
29
+ <groupId >org.postgresql </groupId >
30
+ <artifactId >postgresql </artifactId >
31
+ <version >${postgresql .version} </version >
32
32
</dependency >
33
33
<dependency >
34
34
<groupId >org.projectlombok</groupId >
51
51
<showLogs >true</showLogs >
52
52
<images >
53
53
<image >
54
- <name >mysql: ${mysql.version} </name >
54
+ <name >postgres:15-alpine </name >
55
55
<run >
56
56
<ports >
57
- <port >3306:3306 </port >
57
+ <port >5432:5432 </port >
58
58
</ports >
59
59
<env >
60
- <MYSQL_DATABASE >db</MYSQL_DATABASE >
61
- <MYSQL_ROOT_PASSWORD >some_password</MYSQL_ROOT_PASSWORD >
62
- <MYSQL_USER >user</MYSQL_USER >
63
- <MYSQL_PASSWORD >password</MYSQL_PASSWORD >
60
+ <POSTGRES_DB >person-db</POSTGRES_DB >
61
+ <POSTGRES_USER >person-user</POSTGRES_USER >
62
+ <POSTGRES_PASSWORD >person-password</POSTGRES_PASSWORD >
64
63
</env >
65
64
<wait >
66
- <log >starting as process 1 </log >
65
+ <log >database system is ready to accept connections </log >
67
66
<time >20000</time >
68
67
</wait >
69
68
</run >
Original file line number Diff line number Diff line change 5
5
6
6
<hibernate-configuration >
7
7
<session-factory >
8
- <property name =" hibernate.connection.driver_class" >com.mysql.cj.jdbc .Driver</property >
9
- <property name =" hibernate.connection.url" >jdbc:mysql ://127.0.0.1:3306/db?allowPublicKeyRetrieval=true & useSSL=false </property >
10
- <property name =" hibernate.connection.username" >root </property >
11
- <property name =" hibernate.connection.password" >some_password </property >
12
- <property name =" hibernate.dialect" >org.hibernate.dialect.MySQLDialect </property >
8
+ <property name =" hibernate.connection.driver_class" >org.postgresql .Driver</property >
9
+ <property name =" hibernate.connection.url" >jdbc:postgresql ://127.0.0.1:5432/person-db </property >
10
+ <property name =" hibernate.connection.username" >person-user </property >
11
+ <property name =" hibernate.connection.password" >person-password </property >
12
+ <property name =" hibernate.dialect" >org.hibernate.dialect.PostgreSQLDialect </property >
13
13
<property name =" show_sql" >true</property >
14
14
<property name =" hibernate.id.new_generator_mappings" >false</property >
15
15
Original file line number Diff line number Diff line change 14
14
<name >DB versioning : Root</name >
15
15
16
16
<properties >
17
- <mysql .version>8.0.28</ mysql .version>
18
- <jdbc .driverClassName>com.mysql.cj.jdbc .Driver</jdbc .driverClassName>
19
- <jdbc .url>jdbc:mysql ://127.0.0.1:3306/db?allowPublicKeyRetrieval=true & useSSL=false </jdbc .url>
20
- <jdbc .username>root </jdbc .username>
21
- <jdbc .password>some_password </jdbc .password>
17
+ <postgresql .version>42.6.2</ postgresql .version>
18
+ <jdbc .driverClassName>org.postgresql .Driver</jdbc .driverClassName>
19
+ <jdbc .url>jdbc:postgresql ://127.0.0.1:5432/person-db </jdbc .url>
20
+ <jdbc .username>person-user </jdbc .username>
21
+ <jdbc .password>person-password </jdbc .password>
22
22
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
23
23
</properties >
24
24
You can’t perform that action at this time.
0 commit comments