mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
4.2.7
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.gitee.app.controller;
|
||||
|
||||
import com.gitee.app.model.Goods;
|
||||
import com.gitee.app.model.StoryParam;
|
||||
import com.gitee.sop.servercommon.annotation.Open;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -56,4 +57,12 @@ public class HomeController {
|
||||
return goods;
|
||||
}
|
||||
|
||||
@Open("springmvc.path.same")
|
||||
@RequestMapping("iam_same_path")
|
||||
@ResponseBody
|
||||
public Object iam_same_path(StoryParam param) {
|
||||
param.setName(param.getName() + " mvc..");
|
||||
return param;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,23 @@
|
||||
package com.gitee.app.model;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class StoryParam {
|
||||
@ApiModelProperty(value = "故事ID", example = "111")
|
||||
private int id;
|
||||
|
||||
@NotBlank(message = "name不能为空")
|
||||
@Length(max = 20, message = "name长度不能超过20")
|
||||
@ApiModelProperty(value = "故事名称", required = true, example = "白雪公主", position = 3)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "备注 (第二)", example = "xx", position = 2)
|
||||
@Length(max = 64, message = "长度不能超过64")
|
||||
private String remark;
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.gitee.sop.storyweb.controller;
|
||||
|
||||
import com.gitee.sop.servercommon.annotation.Open;
|
||||
import com.gitee.sop.storyweb.controller.param.StoryParam;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 模拟超时设置
|
||||
*
|
||||
* @author tanghc
|
||||
*/
|
||||
@RestController
|
||||
public class Example1010_SamePathController {
|
||||
|
||||
@Open("story.path.same")
|
||||
@RequestMapping("iam_same_path")
|
||||
public Object iam_same_path(StoryParam param) {
|
||||
param.setName(param.getName() + " story..");
|
||||
return param;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user