天天看點

springboot+swagger2事例

最近閑的蛋疼,就學習了一下springboot和swagger2,并自己做了一個小demo

首先:顯配置pom.xml檔案

springboot+swagger2事例

其次可以寫swagger的config:

springboot+swagger2事例

接下來寫contorller:

springboot+swagger2事例

最後測試注意路徑  通路位址:http://localhost:8888/{工程contextPath}/swagger-ui.html :

springboot+swagger2事例

有需要代碼的童鞋  可以在這個連結下載下傳:http://download.csdn.net/download/qq616138361/10036593點選打開連結