2024.5.24(第二阶段冲刺第十天)
所学时间:2小时
代码行数:87行
博客园数:1篇
所学知识:
1.我昨天的成就:完成了照片接收问题
2.遇到什么困难:前端springboot接收出现的问题
3.今天的任务:完成整体的代码拼接
4.今天所敲的代码:
package com.teamwork.demo.controller;
import com.teamwork.demo.entity.Fish;
import com.teamwork.demo.entity.FishData;
import com.teamwork.demo.entity.Result;
import com.teamwork.demo.service.GetFishService;
import com.teamwork.demo.util.BaiduApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import static com.teamwork.demo.entity.Result.success;
@RestController
@RequestMapping("/getFish")
public class GetFishController {
@Autowired
GetFishService getFishService;
@GetMapping("/getWuRanFish")
public Result<FishData> getWuRanFish() throws IOException {
FishData fishData = getFishService.getWuRanFish(BaiduApi.test());
return Result.success(fishData);
}
}