teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

文の追加

2021/06/07 08:31

投稿

K-actus
K-actus

スコア22

title CHANGED
File without changes
body CHANGED
@@ -11,8 +11,55 @@
11
11
  [https://villim.github.io/debug-springboot-with-gradle-in-eclipse](https://villim.github.io/debug-springboot-with-gradle-in-eclipse)
12
12
  [https://www.gwtcenter.com/invoke-cmd-on-eclipse-project](https://www.gwtcenter.com/invoke-cmd-on-eclipse-project)
13
13
 
14
+ cleanしてbuildし直せば動くという記事もあったので試してみましたが、bootRunのところでやはりエラーを吐きました。
15
+ ![実行構成](681555eb27864216c8f1dc79a9981d0f.png)
16
+ [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)
17
+
14
18
  どこかおかしいところがあればご指摘お願いします。
15
19
 
20
+ ###コード
21
+ 以下build.gradleです。
22
+ ```
23
+ plugins {
24
+ id 'org.springframework.boot' version '2.4.3'
25
+ id 'io.spring.dependency-management' version '1.0.11.RELEASE'
26
+ id 'java'
27
+ }
28
+
29
+ group = 'com.example'
30
+ version = '0.0.1-SNAPSHOT'
31
+ apply plugin: 'war'
32
+ sourceCompatibility = '11'
33
+
34
+ repositories {
35
+ mavenCentral()
36
+ }
37
+
38
+ dependencies {
39
+ implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
40
+ implementation 'org.springframework.boot:spring-boot-starter-web'
41
+ runtimeOnly 'mysql:mysql-connector-java'
42
+
43
+ //1 : jpa
44
+ compile 'org.springframework.boot:spring-boot-starter-data-jpa'
45
+ //2 : mysql connector
46
+ compile 'mysql:mysql-connector-java'
47
+ //3 : tymeleaf
48
+ compile('org.springframework.boot:spring-boot-starter-thymeleaf')
49
+ implementation 'org.springframework.boot:spring-boot-starter-web'
50
+ testImplementation 'org.springframework.boot:spring-boot-starter-test'
51
+
52
+ //lombok
53
+ // https://mvnrepository.com/artifact/org.projectlombok/lombok
54
+ compile group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
55
+
56
+ }
57
+
58
+ test {
59
+ useJUnitPlatform()
60
+ }
61
+ ```
62
+
16
63
  ###エラー内容
17
64
  ```
18
65
  FAILURE: Build failed with an exception.
@@ -33,6 +80,7 @@
33
80
  ```
34
81
  ![エラー](feaeafab49043c6df58643eeb39d8b43.png)
35
82
 
83
+
36
84
  ### 補足情報
37
85
  Eclipse 2020 Java FullEdition
38
86
  AmazonCorretto jdk15.0.2_7