Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
cba42dae
Commit
cba42dae
authored
Aug 14, 2019
by
李秋伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
2099644d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
15 deletions
+38
-15
README.md
protocol-starter/README.md
+38
-15
No files found.
protocol-starter/README.md
View file @
cba42dae
# 介绍
-
# 介绍
protocol-starter提供http、dubbo等协议封装
protocol-starter提供http、dubbo等协议封装
# 特点
# 特点
-
支持dubbo、http协议swagger文档
-
支持dubbo、http协议swagger文档
-
支持dubbo、http协议response异常统一处理
-
支持dubbo、http协议response异常统一处理
-
多语言处理
-
多语言处理
# 文档
# 文档
-
[
dubbo-spring-boot
](
https://github.com/apache/dubbo-spring-boot-project/blob/master/README_CN.md
)
-
[
dubbo-spring-boot
](
https://github.com/apache/dubbo-spring-boot-project/blob/master/README_CN.md
)
-
[
swagger常用注解
](
https://www.jianshu.com/p/f30e0c646c63
)
-
[
swagger常用注解
](
https://www.jianshu.com/p/f30e0c646c63
)
# 开始
# 开始
-
添加依赖
-
添加依赖
-
Maven:需要在自己项目的pom.xml增加,以下配置。
-
Maven:需要在自己项目的pom.xml增加,以下配置。
...
@@ -33,11 +33,33 @@ protocol-starter提供http、dubbo等协议封装
...
@@ -33,11 +33,33 @@ protocol-starter提供http、dubbo等协议封装
</dependency>
</dependency>
```
```
# 示例
# 示例
-
springMvc(略)
-
springMvc
-
dubbo-swagger示例
**注意:使用ApiController注解**
```
@Api(value = "用户管理", tags = "用户管理", position = 3)
@ApiController(value = PathConstant.APPMS + "/user")
public class UserController {
/*
*根据id查询用户
* @Param id
* @return
* */
@GetMapping("/getById")
@ApiOperation(value = "根据id获取用户详细信息", notes = "根据id来获取用户详细信息")
@ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "Long")
public Object getById(Long id) {
return service.getById(id);
}
```
-
dubbo-swagger示例
-
User
-
User
...
@@ -108,6 +130,6 @@ protocol-starter提供http、dubbo等协议封装
...
@@ -108,6 +130,6 @@ protocol-starter提供http、dubbo等协议封装
-
访问方式
-
访问方式
http://localhost:8080/doc.html
http://localhost:8080/doc.html
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment