感悟
似乎没有啥感悟,,主要是看不明白作业要求,产品啥啥啥的,,
代码
package com.example.firstspringboot.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Main {
@GetMapping("/")
public String helloworld(){
return "HelloWorld";
}
@GetMapping("/add")
public int add(@RequestParam int a,@RequestParam int b){
return a+b; }
@GetMapping("/minus")
public int minus(@RequestParam int a,@RequestParam int b){
return a-b;}
@GetMapping("/multiply")
public int multiply(@RequestParam int a,@RequestParam int b){
return ab;}
@GetMapping("/divide")
public int divide(@RequestParam int a, @RequestParam int b){
return (double(a/b));
}
}
我也不知道对不对但是快到ddl了,,*