赞
踩
@RestController
@RequestMapping("/story")
public class StoryController {
@Autowired
private StoryService storyService;
}
@RestController
@RequestMapping("/story")
public class StoryController {
@Autowired
private StoryService storyService;
}
@RestController
@RequestMapping("/story")
public class StoryController {
@Autowired
private StoryService storyService;
/*** 交换两个story*/
@PostMapping("/exchange")
public ResultVO<Story> exchangeById(@RequestParam int src_id,@RequestParam int tar_id){…}
}
/**根据task获取对应的所有story*/
@GetMapping("/list/{taskId}")
public ResultVO<List<Story>> getByTask(@PathVariable int taskId){…}
/**新增story*/
@PostMapping("/create")
public ResultVO<Story> createStory(@RequestBody StoryVO storyInput){…}
var data = {
"taskId": $("#taskId").val(),
"name": $("#name").val(),
"storyPoint": $("#storyPoint").val(),
"priority": $("#priority").val(),
"description":
$("#description").val(),
"posId": $("#posId").val(),
"acceptance":
$("#acceptance").val(),
"releaseId": $("#iteration").val(),
}
$.ajax({
type: "POST",
url: "/story/create",
dataType:"json",
contentType : ‘application/json’,
data:JSON.stringify(data),
success: function (data) {…}
})
@GetMapping("/storyMapping")
public ModelAndView getMapping(@RequestParam int proId){
ModelAndView modelAndView = new ModelAndView("storymap");
modelAndView.addObject("proId",proId);
return modelAndView;
}
<script th:inline="javascript">
var proId = [[${proId}]]
</script>
官方文档:@RestController is a stereotype annotation that combines @ResponseBody and @Controller.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。