簡介
本文介紹Sping Boot + Spring Security + Mybaits + Logback 項目開發框架搭建過程,並且實現JWT驗證,代碼已上傳到github,地址在文章最后可以直接下載代碼。
搭建過程
1 建立工程
工程目錄如下:
2 上傳至GitHub
使用Git shell 進入文件夾
添加遠程倉庫
上傳到遠程倉庫
如果提示這個錯誤 Permission denied(publickey)
需要將本地ssh key添加到倉庫
首先產生本地sshkey
將本地sshkey 加入 sshagent 然后查看sshkey
然后上傳至服務器提示成功。
3 項目搭建
SpringBoot參考穩定中文版:https://www.gitbook.com/book/qbgbook/spring-boot-reference-guide-zh/details
Mybaits 參考文檔地址 :http://www.mybatis.org/mybatis-3/zh/index.html
項目地址:https://github.com/red201432/SpringStudy,可以直接下載工程,如有問題請留言。