Allow interceptors with excludePathPattern only

Issue: SPR-11130
This commit is contained in:
Marten Deinum
2014-06-04 14:25:39 +02:00
committed by Rossen Stoyanchev
parent 52f1be7ade
commit 84c11a5cc7
2 changed files with 22 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -82,7 +82,7 @@ public class InterceptorRegistration {
* {@link MappedInterceptor}; otherwise {@link HandlerInterceptor}.
*/
protected Object getInterceptor() {
if (this.includePatterns.isEmpty()) {
if (this.includePatterns.isEmpty() && this.excludePatterns.isEmpty()) {
return this.interceptor;
}
MappedInterceptor mappedInterceptor = new MappedInterceptor(