mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.1
This commit is contained in:
@@ -89,6 +89,25 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- 文档推送 -->
|
||||
<plugin>
|
||||
<groupId>com.ly.smart-doc</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>3.0.9</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件-->
|
||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||
<!--指定项目名称-->
|
||||
<projectName>${project.artifactId}</projectName>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.gitee.sop</groupId>
|
||||
<artifactId>sop-service-support</artifactId>
|
||||
<version>5.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@@ -13,13 +13,20 @@ import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开放接口定义
|
||||
* 故事服务
|
||||
*
|
||||
* @author 六如
|
||||
* @dubbo
|
||||
*/
|
||||
@Api("故事服务")
|
||||
public interface OpenStory {
|
||||
|
||||
/**
|
||||
* 新增故事
|
||||
*
|
||||
* @param storySaveRequest 入参
|
||||
* @return 返回id
|
||||
*/
|
||||
@Open("story.save")
|
||||
Integer save(StorySaveRequest storySaveRequest);
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package com.gitee.sop.storyweb.open.req;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -14,9 +16,16 @@ import java.util.Date;
|
||||
public class StorySaveRequest implements Serializable {
|
||||
private static final long serialVersionUID = -1214422742659231037L;
|
||||
|
||||
/**
|
||||
* 故事名称
|
||||
*/
|
||||
@NotBlank(message = "故事名称必填")
|
||||
@Length(max = 64)
|
||||
private String storyName;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@NotNull(message = "添加时间必填")
|
||||
private Date addTime;
|
||||
|
||||
|
13
sop-example/example-story/src/main/resources/smart-doc.json
Normal file
13
sop-example/example-story/src/main/resources/smart-doc.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"framework": "sop",
|
||||
"outPath": "target/doc",
|
||||
"projectName": "项目",
|
||||
"packageFilters": "com.gitee.sop.storyweb.open.*",
|
||||
"openUrl": "http://localhost:7700/api", // torna服务器地址
|
||||
"appToken": "a358e4059b17440aae66343f4ec89001", // torna应用token
|
||||
"debugEnvName":"本地环境",
|
||||
"debugEnvUrl":"http://127.0.0.1:8081",
|
||||
"tornaDebug": true,
|
||||
"replace": true,
|
||||
"showValidation": false
|
||||
}
|
Reference in New Issue
Block a user