Step 1: khởi tạo project

Step 2: tạo thử 1 controller
Code:
package com.nentang.edu.spring.helloworld.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWorldController {
@GetMapping("/hello")
String sayHello() {
return "Xin chào Java Spring Boot 3";
}
}
Step 3: run server
Chọn như hình:

Step 4: kiểm tra server
Theo dõi thấy server đang vận hành như hình sau là okey.

Step 5: kiểm tra API với Postman

|