Update: T04/搭建service-producer模块 [2]

This commit is contained in:
2025-10-06 19:20:28 +08:00
parent 371e825200
commit 6d0967f2df
@@ -0,0 +1,18 @@
package cn.hezhaohui.serviceproducer.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Random;
@RestController
@RequestMapping("/api")
public class ProduceController {
@GetMapping("/number")
public int getNum() {
Random random = new Random();
return random.nextInt(101);
}
}