update readme

This commit is contained in:
oppofind 2020-03-21 21:01:52 +08:00
parent 3b73041a19
commit 114321bcf1
1 changed files with 7 additions and 6 deletions

View File

@ -25,7 +25,7 @@ Or a static html document. If you are tired of the numerous annotations and stro
This example already provides a static html document generated in advance. You can start the Spring Boot project and then go directly to `http://localhost:8080/doc/api.html` to view the interface documentation generated by smart-doc.
Of course you can also browse `http://localhost:8080/doc/api.html`,
which looks a html like generated by `asciidoctor-maven-plugin` plugin.
## Add Maven plugin
### Add Maven plugin
Add smart-doc-maven-plugin in your pom.xml.
```
<plugin>
@ -155,18 +155,19 @@ On Use IntelliJ IDE, if you have added smart-doc-maven-plugin to the project,
you can directly find the plugin smart-doc plugin and click to generate API documentation.
![smart-doc-maven-plugin](https://raw.githubusercontent.com/shalousun/smart-doc-maven-plugin/master/images/idea.png)
## Use Junit Test
You can generate documentation by adding smart-doc dependencies directly to your project and then writing unit tests to start smart-doc.
But we still recommend that you use the smart-doc-maven-plugin plugin.
[Use smart-doc by junit test](https://github.com/smart-doc-group/smart-doc/wiki/Use-smart-doc-by-junit-test)
### Generated document example
## Generated document example
#### Interface header rendering
![header](https://images.gitee.com/uploads/images/2019/1231/223538_be45f8a9_144669.png "header.png")
#### Request parameter example rendering
![request-params](https://images.gitee.com/uploads/images/2019/1231/223710_88933f55_144669.png "request.png")
#### Response parameter example renderings
![response-fields](https://images.gitee.com/uploads/images/2019/1231/223817_32bea6dc_144669.png "response.png")
## Integration through unit tests
You can generate documentation by adding smart-doc dependencies directly to your project and then writing unit tests to start smart-doc.
But we still recommend that you use the smart-doc-maven-plugin plugin.
[Use smart-doc by junit test](https://github.com/smart-doc-group/smart-doc/wiki/Use-smart-doc-by-junit-test)
## Building
you can build with the following commands. (Java 1.8 is required to build the master branch)
```