首页>代码>Spring MVC+swagger作为restful api的doc在线文档生成>/apidoc/src/main/java/com/spg/apidoc/controller/StudentController.java
package com.spg.apidoc.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.spg.apidoc.vo.BaseResultVo;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;

/**
 * 项目名称:apidoc
 *
 * @description:
 * @author Wind-spg
 * @create_time:2015年2月10日 下午2:11:40
 * @version V1.0.0
 *
 */
@Controller
public class StudentController extends BaseController
{
    private static final Log LOGGER = LogFactory.getLog(StudentController.class);

    @RequestMapping(value = "updateStudent", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
    @ApiOperation(value = "修改学生信息", httpMethod = "POST", notes = "学生信息以json格式传递", response = BaseResultVo.class)
    public @ResponseBody String updateStudent(@ApiParam(required = true) @RequestParam String postData)
    {
        LOGGER.debug(String.format("enter function, %s", postData));
        return buildSuccessResultInfo(1);
    }

}
最近下载更多
开心灬愉悦  LV9 2021年5月2日
heqian  LV16 2020年12月10日
912299793  LV21 2020年8月29日
青春的尾巴  LV3 2020年8月2日
153393366@  LV9 2019年7月16日
Damionchow  LV4 2019年6月4日
1247879478  LV8 2019年1月17日
hanjinyu  LV11 2018年10月15日
yeling123  LV5 2018年7月9日
longyang1  LV10 2018年7月1日
最近浏览更多
akittyboy  LV9 2月25日
RrrReNax  LV3 2023年7月18日
lipanlong  LV10 2023年7月6日
IT达人  LV22 2023年2月16日
503382513  LV10 2022年12月5日
1358849392  LV21 2022年11月11日
neuwxr2015  LV8 2022年9月20日
crosa_Don  LV18 2022年6月14日
xueying049  LV5 2022年5月9日
whfuai  LV14 2022年5月9日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友