在Apache Shiro中使用spring-security功能

时间:2018-01-31 16:37:14

标签: spring-boot spring-security shiro

在Spring启动Web应用程序中运行Apache Shiro v 1.4.0。到目前为止,一切都运行良好,但我们想利用Spring Security的CSRFFilter,缓存控制和安全标头功能。

我已将spring security starter依赖项添加到我的项目中,并创建了一个空白的安全配置类。无缓存,CSRF令牌和安全头都是默认实现的,这很棒但是很明显,Shiro过滤器过早地提交了servlet响应,导致以下异常:

library(dplyr)    
data_melt <- data_melt %>% group_by(variable) %>% mutate(upper =  quantile(value, 0.75), 
                                                     lower = quantile(value, 0.25),
                                                     mean = mean(value))

# How the first 9 values of your data set should look like now: 
#A tibble: 20 x 6
## Groups: variable [5]
#Sample variable    value    upper    lower     mean
#<fctr> <fctr>      <dbl>    <dbl>    <dbl>    <dbl>
#1 NM     Day_0        1000     1000     1000     1000
#2 OG     Day_0        1000     1000     1000     1000
#3 OD     Day_0        1000     1000     1000     1000
#4 ODD    Day_0        1000     1000     1000     1000
#5 NM     Day_1      221000   985750   318500   648250
#6 OG     Day_1      351000   985750   318500   648250
#7 OD     Day_1      961000   985750   318500   648250
#8 ODD    Day_1     1060000   985750   318500   648250
#9 NM     Day_4     6620000  4317500  1585000  3252500

ggplot(data=data_melt, aes(x=variable, y=value, color = Sample)) + 
      geom_point(size = 2.5) + scale_y_continuous(trans=log2_trans(), 
                                          breaks = trans_breaks("log10", 
                                                   function(x) 10^x), 
                                          labels = trans_format("log10", 
                                                    math_format(10^.x))) + 
      ggtitle("My_Title") + 
      xlab("My_X") + ylab("My_Axis") + 
      theme(plot.title = element_text(hjust = 0.5)) + 
      expand_limits(y = c(10^3, 10^8)) + 
      geom_errorbar(aes(ymin = lower, ymax = upper),col = "red", 
                   width =  0.25) +
      geom_point(aes(x = variable, y = mean), size = 3, col = "red")

当我使用Shiro的内置注销过滤器注销时出现此错误,基本上会删除会话等...

我想在这里做什么甚至可能吗?我已经阅读了Spring安全性并在其过滤器链中注入了您自己的过滤器,但到目前为止我还没有成功。

我想在我走得太远之前得到关于这是否可行的反馈。

0 个答案:

没有答案