0
0

More than 3 years have passed since last update.

【Spring Boot】実行直後に「code 0」で即終了してしまう

Last updated at Posted at 2021-09-21

プロジェクト作成直後、実行すると「code 0」で即終了してしまう

terminal
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.4)

//any logs
//any logs

Process finished with exit code 0

解決した

build.gradleのspring-boot-starterをspring-boot-starter-webにしたら動いた。

build.gradle
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

↑これを
↓こうしたら動いた。

build.gradle
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0