質問編集履歴

2

打消し線

2019/01/29 01:35

投稿

spring_boot
spring_boot

スコア12

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- ~~```properties
15
+ ~~properties
16
16
 
17
17
  spring.datasource.tomcat.driver-class-name=org.h2.Driver
18
18
 
@@ -22,11 +22,11 @@
22
22
 
23
23
  spring.datasource.tomcat.password=
24
24
 
25
- spring.h2.console.enabled=true
25
+ spring.h2.console.enabled=true~~
26
26
 
27
27
 
28
28
 
29
- ```~~
29
+
30
30
 
31
31
 
32
32
 

1

ymlファイルの設定を変更

2019/01/29 01:35

投稿

spring_boot
spring_boot

スコア12

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- ```properties
15
+ ~~```properties
16
16
 
17
17
  spring.datasource.tomcat.driver-class-name=org.h2.Driver
18
18
 
@@ -26,7 +26,37 @@
26
26
 
27
27
 
28
28
 
29
+ ```~~
30
+
31
+
32
+
33
+ 上記設定に間違いがあり設定が反映されませんでした。
34
+
35
+ 以下が正式な書き方になりいます。
36
+
37
+ ついでにymlに変更します。
38
+
39
+
40
+
41
+ ```yml
42
+
43
+ spring:
44
+
45
+ datasource:
46
+
47
+ url: jdbc:h2:mem:test
48
+
49
+ driverClassName: org.h2.Driver
50
+
51
+ username: sa
52
+
53
+ password:
54
+
55
+ h2.console.enabled: true
56
+
29
57
  ```
58
+
59
+
30
60
 
31
61
 
32
62