shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Demers <brian.dem...@gmail.com>
Subject Re: How to Register Custom Filter When Using Shiro Spring Boot
Date Wed, 26 Apr 2017 16:45:44 GMT
Any filter you create should be available by name.
https://shiro.apache.org/static/current/apidocs/org/apache/shiro/spring/web/ShiroFilterFactoryBean.html

something like this should work:

@Bean
public Filter test() {
    return new MyFilter();
}

On Wed, Apr 26, 2017 at 12:00 PM, Rui Tang <tangrui.cn@gmail.com> wrote:

> I'm using shiro-spring-boot package, and I want to use my own filter
> instead of the default filters.
>
> For example, I have a TestFilter which extends from AccessControlFilter,
> and I want to register this filter as name "test" and use the "test" name
> when defining filter chain.
>
> But I've tried a lot of ways to register this filter but without accessed,
> please give me some tips.
>
> Thank you!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message