這篇文章將為大家詳細(xì)講解有關(guān)一文教你正確的使用springsecurity,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關(guān)知識有一定的了解。
springsecurity是基礎(chǔ)springboot的,所以創(chuàng)建一個springboot工程引入依賴就可以很輕松的整合springsecurity了。(類似的權(quán)限管理框架還有shiro)
1. 創(chuàng)建一個普通的springboot項目(不用勾選任何東西),我這邊使用的springboot版本是2.2.1.RELEASE
依賴如下:pom.xml
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-security mysql mysql-connector-java com.baomidou mybatis-plus-boot-starter 3.0.5 org.projectlombok lombok org.springframework.boot spring-boot-starter-test test org.junit.vintage junit-vintage-engine