質問編集履歴
1
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,101 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
cleanしてbuildし直せば動くという記事もあったので試してみましたが、bootRunのところでやはりエラーを吐きました。
|
28
|
+
|
29
|
+
![実行構成](681555eb27864216c8f1dc79a9981d0f.png)
|
30
|
+
|
31
|
+
[https://stackoverflow.com/questions/28303486/error-trying-to-do-a-bootrun-with-gradle-spring-mvc/32073232](https://stackoverflow.com/questions/28303486/error-trying-to-do-a-bootrun-with-gradle-spring-mvc/32073232)
|
32
|
+
|
33
|
+
|
34
|
+
|
27
35
|
どこかおかしいところがあればご指摘お願いします。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
###コード
|
40
|
+
|
41
|
+
以下build.gradleです。
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
plugins {
|
46
|
+
|
47
|
+
id 'org.springframework.boot' version '2.4.3'
|
48
|
+
|
49
|
+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
50
|
+
|
51
|
+
id 'java'
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
group = 'com.example'
|
58
|
+
|
59
|
+
version = '0.0.1-SNAPSHOT'
|
60
|
+
|
61
|
+
apply plugin: 'war'
|
62
|
+
|
63
|
+
sourceCompatibility = '11'
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
repositories {
|
68
|
+
|
69
|
+
mavenCentral()
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
dependencies {
|
76
|
+
|
77
|
+
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
78
|
+
|
79
|
+
implementation 'org.springframework.boot:spring-boot-starter-web'
|
80
|
+
|
81
|
+
runtimeOnly 'mysql:mysql-connector-java'
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
//1 : jpa
|
86
|
+
|
87
|
+
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
|
88
|
+
|
89
|
+
//2 : mysql connector
|
90
|
+
|
91
|
+
compile 'mysql:mysql-connector-java'
|
92
|
+
|
93
|
+
//3 : tymeleaf
|
94
|
+
|
95
|
+
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
|
96
|
+
|
97
|
+
implementation 'org.springframework.boot:spring-boot-starter-web'
|
98
|
+
|
99
|
+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
//lombok
|
104
|
+
|
105
|
+
// https://mvnrepository.com/artifact/org.projectlombok/lombok
|
106
|
+
|
107
|
+
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
test {
|
116
|
+
|
117
|
+
useJUnitPlatform()
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
```
|
28
122
|
|
29
123
|
|
30
124
|
|
@@ -68,6 +162,8 @@
|
|
68
162
|
|
69
163
|
|
70
164
|
|
165
|
+
|
166
|
+
|
71
167
|
### 補足情報
|
72
168
|
|
73
169
|
Eclipse 2020 Java FullEdition
|