| | |
| | | |
| | | String author() default ""; |
| | | |
| | | int seq() default 999; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class CmdDocDto implements Serializable { |
| | | public class CmdDocDto implements Serializable, Comparable<CmdDocDto> { |
| | | |
| | | /** |
| | | * api title |
| | |
| | | * @return |
| | | */ |
| | | private String httpMethod; |
| | | |
| | | private int seq; |
| | | |
| | | /** |
| | | * request url |
| | |
| | | public void setServiceCode(String serviceCode) { |
| | | this.serviceCode = serviceCode; |
| | | } |
| | | |
| | | public int getSeq() { |
| | | return seq; |
| | | } |
| | | |
| | | public void setSeq(int seq) { |
| | | this.seq = seq; |
| | | } |
| | | |
| | | @Override |
| | | public int compareTo(CmdDocDto o) { |
| | | return this.getSeq() - o.getSeq(); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class RequestMappingsDocDto implements Serializable { |
| | | public class RequestMappingsDocDto implements Serializable, Comparable<RequestMappingsDocDto> { |
| | | |
| | | private String name; |
| | | |
| | |
| | | public void setStartWay(String startWay) { |
| | | this.startWay = startWay; |
| | | } |
| | | |
| | | @Override |
| | | public int compareTo(RequestMappingsDocDto o) { |
| | | return this.getSeq() - o.getSeq(); |
| | | } |
| | | } |
| | |
| | | import com.java110.doc.entity.CmdDocDto; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | // 根据字段排序 |
| | | |
| | | Collections.sort(retCmdDocDto); |
| | | |
| | | return retCmdDocDto; |
| | | } |
| | | |
| | |
| | | import com.java110.doc.entity.ApiDocDto; |
| | | import com.java110.doc.entity.RequestMappingsDocDto; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static void setApiDoc(ApiDocDto apiDocDto, List<RequestMappingsDocDto> mappingsDocDtos) { |
| | | ApiDocPublishing.apiDocDto = apiDocDto; |
| | | Collections.sort(mappingsDocDtos); |
| | | ApiDocPublishing.mappingsDocDtos = mappingsDocDtos; |
| | | } |
| | | |
| | |
| | | cmdDocDto.setVersion(attributes.get("version").toString()); |
| | | cmdDocDto.setHttpMethod(attributes.get("httpMethod").toString()); |
| | | cmdDocDto.setServiceCode(attributes.get("serviceCode").toString()); |
| | | cmdDocDto.setSeq(Integer.parseInt(attributes.get("seq").toString())); |
| | | |
| | | |
| | | /*BeanDefinitionHolder definitionHolder = new BeanDefinitionHolder(beanDefinition, beanName); |
| | |
| | | url = "http://{ip}:{port}/app/login.adminLoginProperty", |
| | | resource = "userDoc", |
| | | author = "吴学文", |
| | | serviceCode = "login.adminLoginProperty" |
| | | serviceCode = "login.adminLoginProperty", |
| | | seq = 2 |
| | | ) |
| | | |
| | | @Java110ParamsDoc(params = { |
| | |
| | | url = "http://{ip}:{port}/app/login.pcUserLogin", |
| | | resource = "userDoc", |
| | | author = "吴学文", |
| | | serviceCode = "login.pcUserLogin" |
| | | serviceCode = "login.pcUserLogin", |
| | | seq = 1 |
| | | ) |
| | | |
| | | @Java110ParamsDoc(params = { |
| | |
| | | title = "HC小区管理系统api接口文档", |
| | | description = "HC小区管理系统api接口文档", |
| | | company = "Java110工作室", |
| | | version = "v1.4" |
| | | version = "v1.5" |
| | | ) |
| | | |
| | | @Java110RequestMappingsDoc( |