这个错误是怎么回事,大神帮看一看 There was an unexpected error (type=Bad Request, status=400).
心大自然宽 2020-11-12 11:12:33 There was an unexpected error (type=Bad Request, status=400).
Required Integer parameter 'id' is not present
这个错误是怎么回事,大神帮看一看
Controller
/**
* 根据ID查询全文
* */
@RequestMapping("/findById")
public testpojo findByBId(@RequestParam("id")Integer id){
testpojo time1 = apiService.selectArticleWithId(id);
return time1;
}
Service
//根据ID查询文章
public testpojo selectArticleWithId(int id) {
testpojo time1 = apiMapper.selectArticleWithId(id);
return time1;
}
Mapper
// 根据id查询文章信息
public testpojo selectArticleWithId(int id);
<!-- 根据ID查询所有-->
<select id="selectArticleWithId" resultType="String">
SELECT * FROM time WHERE id =#{id}
</select>