- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 shiro框架源码解析与改造(六)---Subject创建
在AbstractShiroFilter中创建subjectprotected WebSubject createSubject(ServletRequest request, ServletResponse response) { return (new WebSubject.Builder(this.getSecurityManager(), request, respon...
2018-07-26 11:00:15 397
原创 shiro框架源码解析与改造(五)---SpringShiroFilter
这个类继承AbstractShiroFilter ,我在这里对notFilter字段做了实现,在shiro域中划了一块方外之地,减少了Subject的创建。private static final class SpringShiroFilter extends AbstractShiroFilter { private Set<String> notFilters=...
2018-07-26 10:06:11 765
原创 shiro框架源码解析与改造(四)---PathMatchingFilterChainResolver
这个类有两个成员变量 private PatternMatcher pathMatcher = new AntPathMatcher(); private FilterChainManager filterChainManager; filterChainManager是由上文创建的,pathMatcher 是用于匹配路径的。 核心方法是getChain(ServletRe...
2018-07-26 09:44:12 2440
原创 shiro框架源码解析与改造(三)---FilterChainManager
在ShiroFilterFactoryBean中,在创建filter实例时,调用了createFilterChainManager()方法来创建FilterChainManager,并对FilterChainManager 的一些变量进行了初始化 。 /** * 把拦截链,以及过滤器放进manager * @return */ private Filter...
2018-07-26 09:31:40 1811
原创 shiro框架源码解析与改造(二)---ShiroFilterFactoryBean
ShiroFilterFactoryBean是shiro框架的核心起始类,是shiro框架一切流程的源头。上文已经知道,DelegatingFilterProxy会从springmvc容器中查找这个类,并代理执行。 那么ShiroFilterFactoryBean类具体是干什么的呢?查看源码可以看到ShiroFilterFactoryBean实现了 FactoryBean接口,所以真正注...
2018-07-26 09:01:18 1599
原创 shiro框架源码解析与改造(一)---DelegatingFilterProxy
DelegatingFilterProxy是springmvc中的类。在传统项目中web.xml中配置:&lt;filter&gt; &lt;filter-name&gt;ShiroFilter&lt;/filter-name&gt; &lt;filter-class&gt;org.springframework.web.filter.DelegatingF
2018-07-26 08:49:24 612
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人