This repository was archived by the owner on Sep 26, 2023. It is now read-only.
File tree 4 files changed +13
-6
lines changed
4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 44
44
<scope >runtime</scope >
45
45
<optional >true</optional >
46
46
</dependency >
47
- <!--
47
+
48
48
<dependency >
49
49
<groupId >com.h2database</groupId >
50
50
<artifactId >h2</artifactId >
51
51
<scope >runtime</scope >
52
52
</dependency >
53
- -->
53
+
54
54
<dependency >
55
55
<groupId >org.projectlombok</groupId >
56
56
<artifactId >lombok</artifactId >
69
69
<dependency >
70
70
<groupId >org.postgresql</groupId >
71
71
<artifactId >postgresql</artifactId >
72
+ <version >42.6.0</version >
72
73
<scope >runtime</scope >
73
74
</dependency >
74
75
</dependencies >
Original file line number Diff line number Diff line change 1
1
package flurium .jing ;
2
2
3
+ import org .springframework .beans .factory .annotation .Autowired ;
3
4
import org .springframework .boot .SpringApplication ;
4
5
import org .springframework .boot .autoconfigure .SpringBootApplication ;
6
+ import org .springframework .core .env .Environment ;
5
7
6
8
@ SpringBootApplication
7
9
public class JingApplication {
8
-
9
10
public static void main (String [] args ) {
10
11
SpringApplication .run (JingApplication .class , args );
11
12
}
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ public class InitDatabase {
20
20
@ Bean
21
21
public CommandLineRunner init () {
22
22
return args -> {
23
+
24
+ /*
23
25
var category1 = new Category("sport");
24
26
var category2 = new Category("electronics");
25
27
var category3 = new Category("food");
@@ -37,6 +39,8 @@ public CommandLineRunner init() {
37
39
productRepository.save(product2);
38
40
productRepository.save(product3);
39
41
productRepository.save(product4);
42
+ */
40
43
};
44
+
41
45
}
42
46
}
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ spring.datasource.url=${JING_DATASOURCE_URL}
2
2
spring.datasource.username =${JING_DATASOURCE_USERNAME}
3
3
spring.datasource.password =${JING_DATASOURCE_PASSWORD}
4
4
5
- spring.jpa.hibernate.ddl-auto =update
5
+ spring.h2.console.enabled =true
6
+ spring.jpa.hibernate.ddlAuto =update
6
7
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
7
- spring.jpa.database-platform =org.hibernate.dialect.PostgreSQLDialect
8
- spring.datasource.driver-class-name =org.postgresql.Driver
8
+ spring.datasource.driverClassName =org.postgresql.Driver
9
+ spring.jpa.properties.hibernate.format_sql =true
You can’t perform that action at this time.
0 commit comments