中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

微信小程序多少錢做一個(gè)博客程序seo

微信小程序多少錢做一個(gè),博客程序seo,網(wǎng)站的下拉列表怎么做,心力建網(wǎng)站文章目錄 什么是 SpringSesurity ?細(xì)節(jié)使用方法 什么是 SpringSesurity ? 在我們的開發(fā)中,安全還是有些必要的 用 攔截器 和 過濾器 寫代碼還是比較麻煩。 SpringSecurity 是 SpringBoot 的底層安全默認(rèn)選型。一般我們需要認(rèn)證和授權(quán)&#xf…

文章目錄

  • 什么是 SpringSesurity ?
  • 細(xì)節(jié)
  • 使用方法

什么是 SpringSesurity ?

在我們的開發(fā)中,安全還是有些必要的
用 攔截器 和 過濾器 寫代碼還是比較麻煩。

SpringSecuritySpringBoot 的底層安全默認(rèn)選型。一般我們需要認(rèn)證和授權(quán),這也是它的核心功能。我們僅僅需要導(dǎo)入 spring-boot-starter-security 模塊,進(jìn)行少量的配置,即可實(shí)現(xiàn)強(qiáng)大的安全管理

認(rèn)證:驗(yàn)證當(dāng)前訪問系統(tǒng)的用戶 是不是本系統(tǒng)的用戶,并且要具體哪一個(gè)用戶
授權(quán):經(jīng)過認(rèn)證后判斷當(dāng)前用戶是否有權(quán)限進(jìn)行某個(gè)操作

細(xì)節(jié)

登錄過程

在這里插入圖片描述

在這里插入圖片描述

負(fù)責(zé)我們?cè)诘卿涰撁嫣顚懙挠脩艉兔艽a登錄的請(qǐng)求,入門案例主要由他負(fù)責(zé)。

使用方法

總結(jié)到代碼之中。

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

// 開啟 web 安全
@EnableWebSecurity
public class springSecurityConfig extends WebSecurityConfigurerAdapter { // 然后我們繼承 web安全配置 適配器// 鏈?zhǔn)骄幊?#64;Overrideprotected void configure(HttpSecurity http) throws Exception {http.authorizeRequests().  // authorize 授權(quán)antMatchers("/").permitAll()  //  ant ==> 螞蟻    matcher ==> 匹配器 permitAll ==> 允許所有.antMatchers("/test1/**").hasRole("vip1")  //  role角色.antMatchers("/test2/**").hasRole("vip2").antMatchers("/test3/**").hasRole("vip3");// 如果沒有用戶的情況下,則會(huì)跳轉(zhuǎn)到 login 頁面       // 登錄加工的urlhttp.formLogin().loginPage("/toLogin").usernameParameter("name").passwordParameter("pwd").loginProcessingUrl("/Login");//                 http.formLogin()
//                   .loginPage("/toLogin") // 設(shè)置登錄頁面URL
//                   .loginProcessingUrl("/Login") // 設(shè)置表單提交的URL 個(gè)人感覺:應(yīng)該是需要認(rèn)證的模塊
//                   .failureUrl("/login-error") // 登錄失敗后的重定向URL
//                   .defaultSuccessUrl("/home", true) // 登錄成功后的默認(rèn)重定向URL
//                .and()
//                  .logout()
//                   .logoutSuccessUrl("/"); // 注銷成功后的重定向URL// 開啟記住我功能http.rememberMe().rememberMeParameter("jiZhuWo");http.csrf().disable();  // 關(guān)閉腳本跨站攻擊// 開啟注銷功能http.logout().logoutSuccessUrl("/index");  // 注銷成功后,回到 “/index” 之中。}// 認(rèn)證@Override // 最新版本需要密碼加密protected void configure(AuthenticationManagerBuilder auth) throws Exception {  // Authentication 認(rèn)證 Manager 管理者auth.inMemoryAuthentication().passwordEncoder(new BCryptPasswordEncoder()) // Memory 記憶.withUser("xj").password(new BCryptPasswordEncoder().encode("abc")).roles("vip1","vip2")  // memory ==> 記憶.and().withUser("test").password(new BCryptPasswordEncoder().encode("cba")).roles("vip3");}
}

我們可以看到,擁有這個(gè)功能,不僅提供了權(quán)限、安全等,還另外 省去了寫登錄后臺(tái)、過濾器等大量繁雜的代碼,十分的方便

http://www.risenshineclean.com/news/11118.html

相關(guān)文章:

  • 軟件工程和網(wǎng)絡(luò)工程哪個(gè)好合肥網(wǎng)站優(yōu)化seo
  • 外貿(mào)網(wǎng)站建設(shè)模板下載廣西壯族自治區(qū)免費(fèi)百度推廣
  • 網(wǎng)站開發(fā)崗位實(shí)際情況岳陽seo
  • 網(wǎng)站開發(fā)年終總結(jié)魔方優(yōu)化大師官網(wǎng)
  • 如何做網(wǎng)站實(shí)現(xiàn)收入穩(wěn)定免費(fèi)seo關(guān)鍵詞優(yōu)化方案
  • 施工企業(yè)安全生產(chǎn)管理規(guī)范最新版seo站長網(wǎng)怎么下載
  • 做3d人物模型素材下載網(wǎng)站五種營銷工具
  • 順的網(wǎng)站建設(shè)咨詢免費(fèi)國外ddos網(wǎng)站
  • 巴中哪里做網(wǎng)站網(wǎng)站推廣名詞解釋
  • 哪些網(wǎng)站可以做淘寶店招競(jìng)價(jià)代運(yùn)營
  • 金融軟件網(wǎng)站建設(shè)公司百度一下百度網(wǎng)頁官
  • 制作企業(yè)網(wǎng)站需要多少錢b2b平臺(tái)是什么意思啊
  • 國內(nèi)好用的五款開源建站系統(tǒng)企業(yè)培訓(xùn)體系搭建
  • 同一個(gè)服務(wù)器的網(wǎng)站做有鏈?zhǔn)录I銷
  • 重慶網(wǎng)站建設(shè)設(shè)計(jì)俄羅斯搜索引擎瀏覽器官網(wǎng)入口
  • 視頻網(wǎng)站做cpa搜索關(guān)鍵詞的工具
  • php網(wǎng)站用到的知識(shí)山東最新消息今天
  • 如何在工商局網(wǎng)站上做網(wǎng)登湖南專業(yè)關(guān)鍵詞優(yōu)化服務(wù)水平
  • 網(wǎng)站如何制作學(xué)校的做手機(jī)如何建網(wǎng)站
  • 杭州公司展廳設(shè)計(jì)公司網(wǎng)站seo優(yōu)化分析
  • 網(wǎng)站充值接口免費(fèi)推廣軟件
  • 網(wǎng)站建設(shè)需要域名服務(wù)器網(wǎng)絡(luò)營銷手段有哪些方式
  • 網(wǎng)站手機(jī)app開發(fā)seo引擎搜索入口
  • 如何做盆栽蔬菜網(wǎng)站網(wǎng)站首頁快速收錄
  • 哪些網(wǎng)站適合花錢做推廣朝陽區(qū)seo技術(shù)
  • 巫山那家做網(wǎng)站厲害長沙哪里有網(wǎng)站推廣優(yōu)化
  • 互助盤網(wǎng)站開發(fā)杭州龍席網(wǎng)絡(luò)seo
  • wordpress 合法評(píng)論網(wǎng)站seo整站優(yōu)化
  • 網(wǎng)站建設(shè)平臺(tái)網(wǎng)站設(shè)計(jì)seo刷關(guān)鍵詞排名優(yōu)化
  • 慈溪高端網(wǎng)站設(shè)計(jì)百度貼吧怎么做推廣