以Swagger爲例
1.隨便建一個項目
1.若要把Swagger生成doc,我們就先在maven裏添加好Swagger的依賴:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
2.然後再下載Swagger的源碼,然後把需要生成doc的源碼拷貝到我們本地項目中,這樣,拷貝進來的源碼就不會出現lib缺少報錯的問題(因爲依賴裏已經有了)
2.IDEA生成DOC
-encoding utf-8 -charset utf-8