springboot和shiro整合

虽然网上一大堆这方面的文章,可是自己去整合还是会遇到这样那样的问题。今天写出来等待和我一样遇到相同问题的人看见。

首先明白一点springboot之后,web.xml配置基本上就是用不上了。那么,我们的shiro整合需要将那些xml和web.xml文件里面的内容整合到系统中。

我把我这方面的代码全部贴出来,然后再一一阐述我遇到的问题。

package com.framework.demo.web.boot.shiro;

import com.framework.demo.web.controller.collection.MyFilter;
import org.apache.shiro.cache.spring.SpringCacheManagerWrapper;
import org.apache.shiro.realm.UserRealm;
import org.apache.shiro.session.mgt.OnlineSessionFactory;
import org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator;
import org.apache.shiro.session.mgt.eis.OnlineSessionDAO;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.filter.authc.CustomFormAuthenticationFilter;
import org.apache.shiro.web.filter.authc.LogoutFilter;
import org.apache.shiro.web.filter.online.OnlineSessionFilter;
import org.apache.shiro.web.filter.sync.SyncOnlineSessionFilter;
import org.apache.shiro.web.filter.user.SysUserFilter;
import org.apache.shiro.web.mgt.CookieRememberMeManager;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.servlet.SimpleCookie;
import org.apache.shiro.web.session.mgt.OnlineWebSessionManager;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.web.filter.DelegatingFilterProxy;

import javax.annotation.Resource;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Created by demo .
 * Auth: hyssop
 * Date: 2016-09-28-17:50
 */
@Configuration
public class ShiroConfiguration {

    private final String key = "4AvVhmFLUs0KTA3Kprsdag==";
    private final String cookiename = "rememberMe";

    private final String cookiepath = "/";

    private final boolean httponly = true;

    private final Integer maxage = -1;

    private final String blockurl = "/user/login?blocked=1";

    private final String notfoundurl = "/user/login?notfound=1";

    private final String errorurl = "/user/login?unknown=1";

    private final String logouturl = "/user/login?forcelogout=1";

    private final String sucessurl = "/user/login";


    private final String asessioncachename = "shiro-activeSessionCache";

    private final Long globalSessionTimeout = Long.parseLong("1800000");

    private final String loginurl = "/user/login";

    private final String unauthurl = "/unauthorized";

    private static Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();

    @Bean("sessionManager")
    public OnlineWebSessionManager getOnlineWebSessionManager(OnlineSessionDAO onlineSessionDAO, SpringCacheManagerWrapper shiroCacheManager) {
        OnlineWebSessionManager onlineWebSessionManager = new OnlineWebSessionManager();
        onlineWebSessionManager.setGlobalSessionTimeout(globalSessionTimeout);
        onlineWebSessionManager.setSessionFactory(getOnlineSessionFactory());
        onlineWebSessionManager.setSessionDAO(onlineSessionDAO);
        onlineWebSessionManager.setDeleteInvalidSessions(false);
        onlineWebSessionManager.setSessionValidationInterval(globalSessionTimeout);
        onlineWebSessionManager.setSessionValidationSchedulerEnabled(true);
        onlineWebSessionManager.setCacheManager(shiroCacheManager);
        onlineWebSessionManager.setSessionIdCookieEnabled(true);
        onlineWebSessionManager.setSessionIdCookie(getSimpleCookie());
        return onlineWebSessionManager;
    }

    @Bean(name = "shiroFilter")
    @Autowired
    public ShiroFilterFactoryBean getShiroFilterFactoryBean(OnlineSessionDAO onlineSessionDAO, DefaultWebSecurityManager securityManager, OnlineSessionFilter onlineSessionFilter, LogoutFilter logoutFilter, SysUserFilter sysUserFilter, SyncOnlineSessionFilter syncOnlineSessionFilter) {
        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
        shiroFilterFactoryBean
                .setSecurityManager(securityManager);
        shiroFilterFactoryBean.setLoginUrl(loginurl);
        shiroFilterFactoryBean.setUnauthorizedUrl(unauthurl);
        Map<String, Filter> map = new HashMap<String, Filter>();
        map.put("authc", getCustomFormAuthenticationFilter());
        map.put("logout", logoutFilter);
        map.put("sysUser", sysUserFilter);
        map.put("onlineSession", onlineSessionFilter);
        map.put("syncOnlineSession", syncOnlineSessionFilter);
        map.put("myfilter", getMyFilter());
        shiroFilterFactoryBean.setFilters(map);

        filterChainDefinitionMap.put("/static/**", "anon");
        filterChainDefinitionMap.put("/js/**", "anon");
        filterChainDefinitionMap.put("/css/**", "anon");
      /*  filterChainDefinitionMap.put("/favicon.ico", "anon");*/
        filterChainDefinitionMap.put("/images/**", "anon");
        filterChainDefinitionMap.put("/logout", "logout");
        filterChainDefinitionMap.put("/user/login", "authc");
        filterChainDefinitionMap.put("/**", "sysUser,onlineSession,syncOnlineSession,perms,roles");
        shiroFilterFactoryBean
                .setFilterChainDefinitionMap(filterChainDefinitionMap);
        return shiroFilterFactoryBean;
    }

    @Bean(name = "userRealm")
    @Autowired
    public UserRealm getShiroRealm(ApplicationContext ctx) {
        UserRealm userRealm = new UserRealm(ctx);
        return userRealm;
    }
    @Bean(name = "sessionIdGenerator")
    public JavaUuidSessionIdGenerator getJavaUuidSessionIdGenerator() {
        return new JavaUuidSessionIdGenerator();
    }

    @Bean(name = "OnlineSessionFactory")
    public OnlineSessionFactory getOnlineSessionFactory() {
        OnlineSessionFactory onlineSessionFactory = new OnlineSessionFactory();
        return onlineSessionFactory;
    }

    @Bean(name = "rememberMeManager")
    public CookieRememberMeManager getCookieRememberMeManager(SimpleCookie rememberMeCookie) {
        CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
        cookieRememberMeManager.setCipherKey(org.apache.shiro.codec.Base64.decode(key));
        cookieRememberMeManager.setCookie(rememberMeCookie);
        return cookieRememberMeManager;
    }

    @Bean(name = "sessionIdCookie")
    public SimpleCookie getSimpleCookie() {
        SimpleCookie simpleCookie = new SimpleCookie(cookiename);
        simpleCookie.setPath(cookiepath);
        simpleCookie.setHttpOnly(httponly);
        simpleCookie.setMaxAge(maxage);
        return simpleCookie;
    }

    @Bean(name = "rememberMeCookie")
    public SimpleCookie getRemSimpleCookie() {
        SimpleCookie simpleCookie = new SimpleCookie(cookiename);
        simpleCookie.setPath(cookiepath);
        simpleCookie.setHttpOnly(httponly);
        simpleCookie.setMaxAge(maxage);
        return simpleCookie;
    }

    @Bean(name = "springCacheManager")
    @Resource
    public EhCacheCacheManager getSpringCacheManagerWrapper(EhCacheManagerFactoryBean ehCacheManagerFactoryBean) {
        EhCacheCacheManager ehCacheCacheManager = new EhCacheCacheManager();
        ehCacheCacheManager.setCacheManager(ehCacheManagerFactoryBean.getObject());
        return ehCacheCacheManager;
    }

    @Bean(name = "shiroCacheManager")
    public SpringCacheManagerWrapper getShiroCacheManager(EhCacheCacheManager ehCacheCacheManager) {
        SpringCacheManagerWrapper springCacheManagerWrapper = new SpringCacheManagerWrapper();
        springCacheManagerWrapper.setCacheManager(ehCacheCacheManager);
        return springCacheManagerWrapper;
    }


    @Bean(name = "lifecycleBeanPostProcessor")
    public LifecycleBeanPostProcessor getLifecycleBeanPostProcessor() {
        return new LifecycleBeanPostProcessor();
    }

    @Bean
    public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
        DefaultAdvisorAutoProxyCreator daap = new DefaultAdvisorAutoProxyCreator();
        daap.setProxyTargetClass(false);
        return daap;
    }

    @Bean(name ="ehCacheManagerFactoryBean")
    public EhCacheManagerFactoryBean getEhCacheCacheManager() {
        EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
        ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
        ehCacheManagerFactoryBean.setConfigLocation(resolver.getResource("classpath:conf/ehcache/ehcache_es.xml"));
        return ehCacheManagerFactoryBean;

    }

    @Bean(name = "securityManager")
    @Autowired
    public DefaultWebSecurityManager getDefaultWebSecurityManager(UserRealm userRealm, OnlineWebSessionManager onlineWebSessionManager, CookieRememberMeManager cookieRememberMeManager) {
        DefaultWebSecurityManager dwsm = new DefaultWebSecurityManager();
        dwsm.setRealm(userRealm);
        dwsm.setSessionManager(onlineWebSessionManager);
        dwsm.setRememberMeManager(cookieRememberMeManager);
        return dwsm;
    }

    @Bean(name = "sysUserFilter")
    public SysUserFilter getSysUserFilter() {
        SysUserFilter sysUserFilter = new SysUserFilter();
        sysUserFilter.setUserBlockedUrl(blockurl);
        sysUserFilter.setUserNotfoundUrl(notfoundurl);
        sysUserFilter.setUserUnknownErrorUrl(errorurl);
        return sysUserFilter;
    }

    @Autowired
    @Bean(name = "onlineSessionFilter")
    public OnlineSessionFilter getOnlineSessionFilter(OnlineSessionDAO onlineSessionDAO) {
        OnlineSessionFilter onlineSessionFilter = new OnlineSessionFilter();
        onlineSessionFilter.setForceLogoutUrl(logouturl);
        onlineSessionFilter.setOnlineSessionDAO(onlineSessionDAO);
        return onlineSessionFilter;
    }

    @Autowired
    @Bean(name = "syncOnlineSessionFilter")
    public SyncOnlineSessionFilter getSyncOnlineSessionFilter(OnlineSessionDAO onlineSessionDAO) {
        SyncOnlineSessionFilter syncOnlineSessionFilter = new SyncOnlineSessionFilter();
        syncOnlineSessionFilter.setOnlineSessionDAO(onlineSessionDAO);
        return syncOnlineSessionFilter;
    }

    public CustomFormAuthenticationFilter getCustomFormAuthenticationFilter() {
        CustomFormAuthenticationFilter customFormAuthenticationFilter = new CustomFormAuthenticationFilter();
        customFormAuthenticationFilter.setDefaultSuccessUrl(sucessurl);
        customFormAuthenticationFilter.setAdminDefaultSuccessUrl(sucessurl);
        customFormAuthenticationFilter.setUsernameParam("username");
        customFormAuthenticationFilter.setPasswordParam("password");
        customFormAuthenticationFilter.setRememberMeParam("rememberMe");
        return customFormAuthenticationFilter;
    }

    @Bean(name = "logoutFilter")
    public LogoutFilter getLogoutFilter() {
        LogoutFilter logoutFilter = new LogoutFilter();
        logoutFilter.setRedirectUrl(sucessurl);
        return logoutFilter;
    }

    @Bean(name = "onlineSessionDAO")
    public OnlineSessionDAO getOnlineSessionDAO(JavaUuidSessionIdGenerator sessionIdGenerator) {
        OnlineSessionDAO onlineSessionDAO = new OnlineSessionDAO();
        onlineSessionDAO.setSessionIdGenerator(sessionIdGenerator);
        onlineSessionDAO.setActiveSessionsCacheName(asessioncachename);
        return onlineSessionDAO;
    }

    @Bean
    @Autowired
    public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
        AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
        aasa.setSecurityManager(securityManager);
        return new AuthorizationAttributeSourceAdvisor();
    }

    /*给自己留了一个口加过滤器*/
    public MyFilter getMyFilter() {
        return new MyFilter();
    }

    public static Map<String, String> getFilterChainDefinitionMap() {
        return filterChainDefinitionMap;
    }

    public static void setFilterChainDefinitionMap(Map<String, String> filterChainDefinitionMap) {
        ShiroConfiguration.filterChainDefinitionMap = filterChainDefinitionMap;
    }

    @Bean
    public FilterRegistrationBean filterRegistrationBean() {
        FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
        DelegatingFilterProxy delegatingFilterProxy = new DelegatingFilterProxy("shiroFilter");
        delegatingFilterProxy.setTargetFilterLifecycle(true);
        filterRegistration.setEnabled(true);
        filterRegistration.setFilter(delegatingFilterProxy); //  该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理  filterRegistration.addInitParameter("targetFilterLifecycle", "true");
        filterRegistration.addUrlPatterns("/*");
        filterRegistration.setDispatcherTypes(DispatcherType.REQUEST);
        return filterRegistration;
    }

}

问题1:filter造成了一个死循环的局面

刚开始整合完毕的时候,我迫不及待的而启动项目,发现我的filter过滤器在无限次的执行,一遍一遍执行停不下来。

我跟了下代码发现了每次请求的时候shiro是通过类AdviceFilter的doFilterInternal方法在执行过滤。

截图我的过滤器形式是:

sysUserFilter->onlineSessionFilter->syncOnlineSessionFilter->formAuthenticationFilter->logoutFilter->myFilter->Jetty_WebSocketUpgradeFilter->dispatcherServlet@7ef5559e==org.springframework.web.servlet.DispatcherServlet,-1,true

很明显,sysUserFilter是一个代理过滤器,它代理了后面的过滤器,而这些过滤器貌似又让我配置到的spring环境中,这样在sysUserFilter中调用后面的过滤器,后面的过滤器后能通过DispatcherServlet找到sysUserFilter过滤器,这样会造成一个死循环的局面。究其原因,是我配置有误:我把所有的过滤器生成类都用@Bean标注了。我将其删除问题消失。

问题2:remeber base64是shiro的类,且不可将其配置成其他的base64(比如common包里的或者jdk里的)。

欢迎加入微信公众号:hyssop的后花园

转载于:https://my.oschina.net/zjItLife/blog/761838

SpringBoot之整合Shiro(最详细) pom.xml 2.3 创建前端页面 在webapp文件夹中创建index.jsp和login.jsp index.jsp login.jsp 2.4 配置视图信息 application.properties 2.5 解决IDEA冲突问题 JSP 与IDEA 与SpringBoot存在一定的不兼容,修改此配置即可解决 pom.xml 3.2 自定义Realm 在shiro文件夹下创建realm文件夹 3.3 Shiro配置 在config文件夹中创建ShiroConfig.java 3.4 启动测试 输入 阅读详情

相关推荐

一篇文章带你搞定 SpringBoot 整合 Shiro

文章目录一、Shiro 和 SpringSecurity 比较二、原生的整合1. 环境搭建2. 创建 Realm3. 配置 ShiroConfig4. 配置 Controller三、使用 Shiro Starter 实现1. 环境搭建2. 配置 ShiroConfig3. 配置 Shiro 信息 一、Shiro 和 SpringSecurity 比较 在 Spring Boot 中做权限管理,一般来说,主流的方案是 Spring Security ,但是,仅仅从技术角度来说,也可以使用 Shiro。 一般来

南淮北安的博客 2596

sessionmanager在shiro中的作用

shiro提供了完整的会话管理功能,不依赖底层容器,JavaSE应用和JavaEE应用都可以使用。SessionManager(会话管理器)管理着应用中所有Subject的会话,包括会话的创建、维护、删除、失效、验证等工作。 DefaultSecurityManager默认使用的SessionManager为DefaultSessionManager,用于JavaSE环境的session管理。 SessionManager 接口 SessionManager 接口是Shiro所有会话管理器的顶级接口。在此接

m0_67391377的博客 437

SpringBoot整合Shiro

Shiro简介   Apache Shiro是一个开源的轻量级的Java安全框架,它提供了身份认证、授权、密码管理、会话管理等操作。我们知道在Spring中也有一个跟它功能差不多的框架Spring Security,Shiro框架可以更加直观的提供安全性操作,在SSM框架中整合Shrio的配置步骤比较多。但是争对SpringBoot,在SpringBoot官方也提供了对应的启动器。这样的话化简了S...

初学者 2706

java web项目里ehcache.xml的参数说明

name:缓存名称。        maxElementsInMemory:缓存最大个数。        eternal:对象是否永久有效,一但设置了,timeout将不起作用。        timeToIdleSeconds:设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。        t

涂作权的博客 1735

WRF模式学习入门基础(建议收藏!!!)

本文详细介绍了WRF-ARW(Advanced Research WRF)模式的结构组成,重点讲解了前处理系统(WPS)和主模式中的各个关键程序的功能与流程。通过对geogrid、ungrib、metgrid、real和wrf等模块的逐步解析,帮助初学者全面理解数值天气预报模型在初始化和运行过程中所需的关键步骤。

2503_90234341的博客 3160

drm 之modes

#define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <time.h&...

u012794472的专栏 3733

【若依】开源框架学习笔记 02 - Shiro 权限框架

若依开源框架学习之 Shiro权限框架集成

MichelleChung的星球 5885

莫比乌斯反演

本文从算法竞赛和数论角度出发,系统介绍了狄利克雷卷积与莫比乌斯反演的核心概念。首先定义了数论函数及其基本性质,重点阐述了狄利克雷卷积的代数结构(交换环)和关键恒等式(如μ*1=ε)。随后通过卷积视角简化了莫比乌斯反演的证明过程。最后将理论提升至抽象代数层面,揭示这些数论工具本质上是偏序集关联代数在整除关系下的特例,其中莫比乌斯函数对应Zeta函数的逆元。全文展现了数学概念从具体到抽象的升华过程,为理解这些工具提供了更深刻的代数视角。

aichitang2024的博客 401

springboot使用shiro配置多个过滤器和session同步案例

案例代码来自ruoyi管理系统的shiro部分 知识点介绍 AccessControlFilter AccessControlFilter提供了访问控制的基础功能;比如是否允许访问/当访问拒绝时如何处理等: isAccessAllowed:表示是否允许访问;mappedValue就是[urls]配置中拦截器参数部分,如果允许访问返回true,否则false; onAccessDenied:表示当访问拒绝时是否已经处理了;如果返回true表示需要继续处理;如果返回false表示该拦截器实例已经处理了,将直接返

qq_41358574的博客 5024

DeepSeek跨会话协作指南:让AI成为你的「第二大脑」

通过DeepSeek的跨会话协作系统,用户实测工作效率提升63%。

紫夜若涵的博客 1507

Qt基础之十九:进程与QProcess

进程就是一个程序的执行实例,也就是正在运行的程序。对操作系统来说,进程就是一个担当分配系统资源CPU时间、内存的实体。在Qt 中,我们使用QProcess来表示一个进程。这个类可以允许我们的应用程序启动一个新的外部程序,并且与这个程序进行通讯。当外部程序开始启动时,QProcess的状态为Starting;外部程序已经启动时,QProcess的状态为Running,并发送started()信号;当外部层序退出了,QProcess的状态为NotRunning(初始状态),并发送finished()信号。

草上爬的博客 1万+

Spring Cache 学习笔记

是一个框架,实现了基于注解的缓存功能,只需要简单地加一个注解,就能实现缓存功能。SpringCahce提供了一层抽象,底层可以切换不同的cache实现。具体就是通过CacheManager接口来统一不同的缓存技术。CacheManager是Spring提供的各种缓存技术抽象接口。...

Adeluoo的博客 449

Coze智能体开发:扣子智能体设置多Agent模式

在扣子中创建智能体后,智能体默认使用单 Agent 模式。在单 Agent 模式下处理复杂任务时,你必须编写非常详细和冗长的提示词,而且你可能需要添加各种插件和工作流等,这增加了调试智能体的复杂性。调试时任何一处细节改动,都有可能影响到智能体的整体功能,实际处理用户任务时,处理结果可能与预期效果有较大出入。

王国平的博客 3727

【SpringBoot】Spring Boot 整合 Shiro

在 Spring Boot 中做权限管理,一般来说,主流的方案是 Spring Security ,但是,仅仅从技术角度来说,也可以使用 Shiro。 今天松哥就来和大家聊聊 Spring Boot 整合 Shiro 的话题! 一般来说,Spring Security 和 Shiro 的比较如下: Spring Security 是一个重量级的安全管理框架;Shiro 则是一个轻量级的安全管理框架 Spring Security 概念复杂,配置繁琐;Shiro 概念简单、配置简单 Spring S

to_real的博客 501

微信小程序 - 最新获取用户昵称 / 头像(wx.getUserProfile 接口被废弃后的代替方案)详细教程,2022 年之后的所有微信小程序,获取用户信息最新详细教程,附带示例源代码

微信小程序wx.getUserProfile接口废了用什么代替,微信小程序wx.getUserProfile不能用了怎么办,wx.getUserProfile失效有什么替代方案吗,微信新规定头像昵称填写最新教程,目前微信小程序最新获取用户头像昵称教程,微信小程序用户头像昵称获取规则调整公告,2022改版后的微信小程序如何获取用户头像和昵称信息,微信小程序官方废弃getUserProfile后如何实现获取用户信息,微信小程序wx.getUserProfile接口返回了默认头像昵称,微信小程序获取用户信息不

🏆 前端领域优质创作者 2万+

利用SIMULINK搭建一个16QAM调制解调收发系统

1发送模块设计 根据前面介绍的理论知识,我们可以知道16QAM的基本结构,首先我来设计QAM发送段的SIMULINK仿真模块。 图1 16QAM的发送端模块 他的基本工作流程为:将信号通过两路升余弦滤波器,得到滤波以后的信号,滤波器的作用就是为了防止码间干扰。然后将滤波以后的信号和SIN,COS相乘得到调制信号,将调制 下面一一介绍每个模块的具体参数设置以及各个部分信号的波形图。 图2 产生随机数据的信号源 第一部分信号是产生一组随机的数字,作为信源,第二个模块将信号...

FPGA/MATLAB学习教程/源码/项目合作开发 4779

springboot整合shiro相关依赖和配置整理

springboot整合shiro 一、shiro快速开始 去github下载shiro,找到samples/quickstart文件夹。用idea打开它,点进shiro.ini文件。这个时候idea会提示下载插件,下载它。 二、新建一个spring boot项目复制如下依赖 这些都是我整合好的,版本的话你可以自己控制。 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mav...

weixin_44105802的博客 3073

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

Spring Boot整合Shiro + Springboot +vue

目录 02 Spring Boot整合Shiro p1.shiro概述 1 什么是Shiro 2 Shiro核心组件 p2.Shiro实现登录认证 AccountRealm.java QueryWrapper 类名和表名是一一对应的 mapper报错解决 测试 pom.xml p3.Shiro实现请求授权 配置类 ShiroConfig **编写认证和授权规则: controller p4.Shiro整合Thymeleaf --认证完成,开始授权 13:52

weixin_41290863的博客 4045

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Springboot整合shiro

是一款主流的Java安全框架,不依赖任何容器,可以运行在Java SE和Java EE项目中,它的主要作用是对访问系统的用户进行身份认证、授权、会话管理、加密等操作。Shiro 就是用来解决安全管理的系统化框架。Shiro是基于session的身份认证和访问控制框架。RBAC是Role-Based Access Control(基于角色的访问控制)的缩写。它是一种广泛应用于安全管理中的访问控制模型。RBAC模型通过授予用户不同的角色,并将角色与权限进行关联,来管理对资源的访问。

chao的博客 2801

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

SpringBoot之整合Shiro

本文主要内容:SpringBoot整合Shiro ###Shiro基本介绍 1.基本概念:Shiro是一个强大且易用的Java安全框架,执行身份验证、授权、密码和会话管理 2.Shiro的三大核心组件:Subject, SecurityManager和Realms 1. Subject:是一个安全术语,其基本意思是“当前的操作用户”,称之为“用户”并不准确,因为“用户”一词通常跟人相关,但是Subject也可以是第三方进程、后台帐户(Daemon Account)、定时作业(Corn Job)或其他类似事

Fortuneteller的博客 290

Springboot整合Shiro框架入门

Springboot中集成Shiro框架1、快速开始demo2、Springboot集成Shiro2.1、环境搭建2.2、shiro的拦截2.3、shiro的认证2.4、整合mybatis2.5、shiro进行授权2.6、shiro整合thymeleaf 1、快速开始demo 来到shiro的官网:shiro官方网站: 下载官方在git仓库上提供的源码,下载后解压: 官方提供了在多种场景下使用的demo,等一下会用到sample里面的东西。下面直接按官方推荐的10分钟入门demo进行测试。 创建一

qq_42640067的博客 2154

SpringBoot与Shiro整合

本文章介绍了Spring boot下shiro与thymeleaf、mybatis的整合过程,Apache Shiro是一个强大且易用的Java安全框架,执行身份验证、授权、密码和会话管理

fangliangke的博客 6522

springboot整合shiro配置不拦截特定页面_Spring Boot 整合 Shiro ,两种方式全总结!...

点击“牧码小子”关注,和众多大牛一起成长!关注后,后台回复 java ,领取松哥为你精心准备的技术干货!在 Spring Boot 中做权限管理,一般来说,主流的方案是 Spring Security ,但是,仅仅从技术角度来说,也可以使用 Shiro。今天松哥就来和大家聊聊 Spring Boot 整合 Shiro 的话题!一般来说,Spring Security 和 Shiro 的比...

weixin_31207903的博客 3932
上一篇: 【原创】js中利用cookie实现记住密码功能
下一篇: 记一次部门迎新趣味竞技活动
weixin_33894640
博客等级 码龄11年 5337粉丝 1265原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值