}
// 将拦截器设置到module中
List<InterceptorDelegate> interceptors = findInterceptors(moduleContext);
for (Iterator<InterceptorDelegate> iter = interceptors.iterator(); iter.hasNext();) {
InterceptorDelegate interceptor = iter.next();
ControllerInterceptor most = InterceptorDelegate
.getMostInnerInterceptor(interceptor);
if (!most.getClass().getName().startsWith("net.paoding.rose.web")) {
// 先排除deny禁止的
if (moduleResource.getInterceptedDeny() != null) {
if (RoseStringUtil.matches(moduleResource.getInterceptedDeny(), interceptor
.getName())) {
iter.remove();
if (logger.isDebugEnabled()) {
logger.debug("module '" + module.getMappingPath()
+ "': remove interceptor by rose.properties: "
+ most.getClass().getName());
}
continue;
}
}
// 确认最大的allow允许
if (moduleResource.getInterceptedAllow() != null) {
if (!RoseStringUtil.matches(moduleResource.getInterceptedAllow(),
interceptor.getName())) {
iter.remove();
if (logger.isDebugEnabled()) {
logger.debug("module '" + module.getMappingPath()
+ "': remove interceptor by rose.properties: "
+ most.getClass().getName());