Skip to content

neovim Java Spring Boot

lamt edited this page Oct 4, 2022 · 4 revisions

neovim Java Spring Boot

Preparation

Please complete the following tasks:

neovim Java.

How to execute

# Terminal 1
git clone https://github.com/spring-guides/gs-rest-service.git
cd gs-rest-service/complete
./gradlew bootRun
# Terminal 2
curl 'http://localhost:8080/greeting?name=hoge'
  {"id":1,"content":"Hello, hoge!"}

C-c in Terminal 1.

Debugging

# Terminal 1
cd gs-rest-service/complete
./gradlew bootRun --jvm-debug
# Terminal 2
cd gs-rest-service/complete
vi src/main/java/com/example/restservice/GreetingController.java
  1. space C: Run JdtRefreshDebugConfig command
  2. F9: Set Breakpoint
  3. F5: Start Debug
# Terminal 3
curl 'http://localhost:8080/greeting?name=hoge'
  1. Stop at Breakpoint
  2. F5: Continue
# Terminal 2
# Output
  {"id":1,"content":"Hello, hoge!"}
  1. F4: Disconnect
  2. space u: Close dapui

(also F5-> Terminate session)

Clone this wiki locally