Avoid scoped destruction callbacks in case of no post-processor actually applying

Issue: SPR-13744
This commit is contained in:
Juergen Hoeller
2015-12-18 17:14:57 +01:00
parent fca5365cf1
commit 2e6eb614b5
3 changed files with 33 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 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.
@@ -126,6 +126,11 @@ public class SimpleServletPostProcessor implements
}
}
@Override
public boolean requiresDestruction(Object bean) {
return (bean instanceof Servlet);
}
/**
* Internal implementation of the {@link ServletConfig} interface,