Skip to content

Commit

Permalink
新增 boolean 结果类型响应类
Browse files Browse the repository at this point in the history
  • Loading branch information
fengwenyi committed Jul 31, 2022
1 parent 1f986c3 commit b85bd66
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
14 changes: 14 additions & 0 deletions LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# 版本更新日志


## v2.7.3

2022.07.31 ~

:star: New Features

- 新增 Boolean 结果类型响应类:`BooleanResponse`

:memo: Document

- 修复文档示例代码不正确的问题


## v2.7.2

2022.07.16 ~ 2022.07.17
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>com.fengwenyi</groupId>
<artifactId>api-result</artifactId>
<version>2.7.2</version>
<version>2.7.3</version>
</dependency>
```

Expand All @@ -34,8 +34,8 @@
public class ApiController {

@RequestMapping("/demo")
public ResponseTemplate<Void> demo() {
return ResponseTemplate.success();
public ResultTemplate<Void> demo() {
return ResultTemplate.success();
}

}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.fengwenyi</groupId>
<artifactId>api-result</artifactId>
<version>2.7.2</version>
<version>2.7.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>api-result</name>
<description>一套RESTful风格API接口响应参数规范化的解决方案</description>
Expand Down
35 changes: 35 additions & 0 deletions src/main/java/com/fengwenyi/api/result/BooleanResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.fengwenyi.api.result;

import java.io.Serializable;

/**
* Boolean 结果响应类
* @author <a href="https://fengwenyi.com">Erwin Feng</a>
* @since 2022-07-31
*/
public class BooleanResponse implements Serializable {

private static final long serialVersionUID = -5745710206906492721L;

/** 是否成功 */
private Boolean success;

/** 信息 */
private String msg;

public Boolean getSuccess() {
return success;
}

public void setSuccess(Boolean success) {
this.success = success;
}

public String getMsg() {
return msg;
}

public void setMsg(String msg) {
this.msg = msg;
}
}

0 comments on commit b85bd66

Please sign in to comment.