关于shiro不进入successURL的问题

shiro successUrl 不起作用 解决 看源码 调用顺序  1: 2: 3: 解决方案============= 自定义FormAuthenticationFilter继承FormAuthenticationFilter 重写onLoginSucess方法 阅读详情

在学习shiro的时候,使用shiro提供的登录验证,但是一直不跳入successURL。

<property name="securityManager" ref="securityManager" />
        <property name="loginUrl" value="/user/login"></property>
        <property name="successUrl" value="/user/welcome"></property>
        <property name="unauthorizedUrl" value="/403.jsp"></property>
        <property name="filters">
            <util:map>
                <entry key="authc" value-ref="formAuthenticationFilter"></entry>
            </util:map>
        </property>

原因,我为了方便不是直接进入登录页面,而是通过访问index.jsp,未验证跳入了登录页面。

而shiro则是通过session记录了你从哪个页面进入了登录页面,当你登录成功后,会直接进入记录的页面。而不会进入successURL

shiro整合cas多次验证或者重复重定向问题 很多人初学都会遇到多次验证或者重复重定向,然后拿着异常网上各种查资料,到最后会发现,是因为shiro封装了指定的返回路劲:/、/index、上次request地址 通过配置文件配置的路劲,只是一个辅助作用,在shiro找不到跳转路劲后才会跳转到配置的路劲,所以我们要做的就是:重写跳转方法。 阅读详情

相关推荐

重写shiro跳转路劲loginUrl、successUrl等

最近有个需求,shiro中的路劲配置要求可以后台管理,以实现不同浏览器进入不同登录页面,不同权限进入不同首页。 研究源码后的解决方案: shiroFilter配置中的跳转,都是基于以下类进行设置的: 所以我们要做的就是继承并重写该类中的某些方法: 登录URL跳转:redirectToLogin 登录成功后的跳转:onLoginSuccess 最常用的就是这两个路劲,至于说特殊需求需

喵″的博客 1万+

shiro登陆成功不跳转successUrl的问题

<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> <property name="securityManager" ref="securityManager" /> <!-- loginUrl认证提交地址,如果没有认证将会请求此地址进行认证,请求此地址将由for

i晨i曦520 1万+

华为FusionCompute v100R003C00 实操配置与故障排查指南

虚拟化平台是现代数据中心的核心底座,其配置逻辑远非简单界面操作,而是涉及计算、存储、网络三要素的强依赖协同。理解 FusionCompute 的分层架构(CNA/VRM/UVP)、存储多路径机制、DVS 网络绑定规则及异步状态校验原理,是保障虚拟机稳定启停与IO可靠性的技术前提。本文聚焦华为 FusionCompute v100R003C00 版本,结合金融级生产环境真实案例,详解裸金属初始化、LUN 映射验证、心跳超时调优、日志交叉定位等关键实践,覆盖从集群纳管到模板克隆的全链路运维要点,助力工程师将配置

weixin_34326558的博客 396

SSM整合Shiro一直重复进入登录页面

SSM整合Shiro一直反复跳转到登录页面,原因是没有subject.login(token)的方法

weixin_45805936的博客 669

SAP ERPsim生产拓展实验报告

ERP课的实验和实践,也是SAP竞赛玩的东西,除了界面不华丽外很像游戏而且是团队型的pvp大乱斗

m0_67262022的博客 2020

大数据工程中的多模态数据处理技术

模态”(Modality)指的是数据的表现形式文本(Text):新闻、评论、文案等;图像(Image):照片、截图、医学影像等;音频(Audio):语音、音乐、环境声音等;视频(Video):短视频、监控视频、电影等(本质是图像+音频的组合);数值/结构化数据(Numerical/Structured):用户年龄、商品价格、传感器数据等;时间序列(Time Series):股票价格、物流轨迹、心率数据等。多模态数据(Multimodal Data)是指包含两种或以上模态的数据集。

AI云原生与云计算技术学院 1277

Spring Boot 整合 Shiro ,两种方式全总结!

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

weixin_33786077的博客 1481

多尺度变换(Multidimensional Scaling ,MDS)详解

介绍多尺度变换基本原理

5219

Shiro setSuccessUrl 不生效

问题描述 Cntroller 请求控制类 ShiroConfig配置类 如上代码,请求/login,因为设置了setSuccessUrl属性的原因,请求成功后正常是会跳转到/index下面才对,可是经过测试,却返回了 login success,这明显是不符合我的设计的。 问题分析 问题的原因很可能是这个setSuccessUrl属性没有生效,所以我进行了debug,排查了一下问题的原因。 发现在Shiro的WebUtils这个工具类里面,有这么一个判断,这个正是设置setSuccessUrl属性的

如果人生就像一场梦,那就希望你做个好梦! 966

用树莓派搭建全功能NAS服务器(01):树莓派基础操作&OMV搭建

写在前面 对于文件互传来说,局域网和云盘的操作总是独立的,而且很难将两者的优势合为一体。如果想要集多种优势为一体,那么NAS应该就是较为完美的解决方案了。 在这个系列中我们尽量跳过一些枯燥的理论知识,专注于说明两件事:   1.NAS是什么&能做什么 2.搭建思路&怎么做   这中间也会涉及到一些方案的选择,同类方案我也会列出来和大家分享我已知的优缺点,有兴趣可以多种尝试。(侧重于软件) 虽然是用树莓派搭建的,但是对于debian linux系统下的NAS搭建有着很好的参

斯塔克家的真维斯的工作间 2万+

PCA9548实战:从硬件连接到Linux驱动的I2C扩展全解析

本文详细解析了PCA9548 I2C多路复用器从硬件连接到Linux驱动配置的全过程。涵盖硬件引脚连接、电源去耦、地址选择等关键设计要点,以及Linux驱动加载、设备树配置和应用层编程技巧,帮助开发者高效实现I2C总线扩展。

weixin_28726391的博客 413

shiro不跳转successUrl的问题

最近遇到shiro校验框架成功后不进行自动跳转到指定页面; 相关配置如下: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 bean id="shiroFilter" class="org.apache.shiro.sp

wangshfa的专栏 5113

紫光同创PDS软件操作指南:如何为FPGA新增自定义Flash型号

本文详细介绍了在紫光同创PDS软件中为FPGA新增自定义Flash型号的完整操作指南。针对官方支持列表之外的SPI Flash芯片,文章从理解FPGA配置逻辑入手,逐步讲解如何通过扫描Flash ID、在Flash Operator中精准填写参数、转换.sbit文件,最终完成固化的全过程,并分享了高级技巧与常见问题排查方法,帮助工程师摆脱对预设型号的依赖,实现灵活选型。

weixin_29204749的博客 327

shiro登陆后没有返回设置的successUrl

iframe的页面,shiro登陆后没有返回设置的successUrl

weihuiming 5220

ESP-IDF 利用ESP32构建智能音乐播放器(一)---------- 实现SD卡MP3文件的解码与播放

本文详细介绍了如何利用ESP32和ESP-IDF开发框架,从零开始构建一个智能音乐播放器。文章重点讲解了如何通过SD卡模块读取MP3文件,并集成Helix MP3解码库进行软件解码,最终通过I2S接口驱动音频模块实现播放。内容涵盖硬件连接、软件环境搭建、核心解码与输出逻辑,为嵌入式音频开发提供了完整的实战指南。

weixin_29163797的博客 234

音乐生成 - 使用LSTM或Transformer模型进行音乐生成,如MIDI音乐生成。

在本篇博客中,我们将介绍如何使用LSTM和Transformer模型生成MIDI音乐。我们将首先概述音乐生成的一般流程,然后深入了解LSTM和Transformer模型的特点和实现。最后,我们将通过Python代码演示如何使用这两种模型生成MIDI音乐。

斌擎科技 1722

shiro中successUrl不起作用的问题

在看shiro的时候遇到一个问题,shiro配的successUrl不生效的问题 <!-- web.xml中shiro的filter对应的bean --> <!-- Shiro 的Web过滤器 --> <bean id="shiroFilter" class="org.apache.shiro.spring.web.Shir...

disuoxia5722的博客 380

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Shiro教程、验证码kaptcha、successUrl不跳转问题解决

shiro教程 http://jinnianshilongnian.iteye.com/blog/2018398 验证码kaptcha http://aperise.iteye.com/blog/2276496 FormAuthenticationFilter 的successUrl不跳转问题 http://aperise.iteye.c

猿类崛起 3516

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

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

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

shiro不跳转successUrl问题

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34289454的博客 328

IEM模型,地表粗糙度模拟

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

shiro认证成功后,没有跳转到配置的successUrl

项目框架:spring boot + jpa,maven管理 昨天在项目中使用shiro的时候,发现shiro认证成功后一直跳转的界面是"/"这个界面,报一个404异常,自己配置的successUrl感觉没有起作用,总结前人博客,并且查看源码,知道了原因: 首先,shiro在认证成功后,会调用onLoginSuccess方法, onLoginSuccess(token, subject, ...

重来不喝咖啡の博客 6467

shiro 登录成功后 不跳转到 successUrl 的问题解决

1.重写 FormAuthenticationFilter 父类的  issueSuccessRedirect 方法 import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; ...

fendou_0123456789的博客 2549

shiro登陆后没有返回设置的successUrl?

  第一次学习shiro的时候,并没有发现很大的问题。但后来在做项目的时候,特别是当访问的url是iframe的页面的时候,session又过期了,跳转到登陆页,完成登陆操作后,返回了只有iframe的页面,相当不好看。虽然在shiro里设置了successUrl,但是没有起作用。   不明真相的我,debug后跟进去观察后发现FormAuthenticationFilter成功登陆后...

anchichun6550的博客 209

shiro不跳转successUrl的有关问题

参考:http://www.myexception.org/software-architecture-design/1753829.html

fendou_0123456789的博客 494
上一篇: webpack-react
下一篇: nginx-tomcat
cst_code
博客等级 码龄10年 4粉丝 59原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值