Merge branch '3.2.x'

* 3.2.x: (28 commits)
  Hide 'doc' changes from jdiff reports
  Document @Bean 'lite' mode vs @Configuration
  Final preparations for 3.2.2
  Remove Tiles 3 configuration method
  Polishing
  Extracted buildRequestAttributes template method from FrameworkServlet
  Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
  Minor refinements along the way of researching static CGLIB callbacks
  Compare Kind references before checking log levels
  Polish Javadoc in RequestAttributes
  Fix copy-n-paste errors in NativeWebRequest
  Fix issue with restoring included attributes
  Add additional test for daylight savings glitch
  Document context hierarchy support in the TCF
  Fix test for daylight savings glitch
  Make the methodParameter field of HandlerMethod final
  Disable AsyncTests in spring-test-mvc
  Reformat the testing chapter
  Document context hierarchy support in the TCF
  Document context hierarchy support in the TCF
  ...
This commit is contained in:
Phillip Webb
2013-03-13 14:01:46 -07:00
267 changed files with 8384 additions and 6246 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@@ -51,36 +51,32 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();
if (LOGGER.isDebugEnabled() || LOGGER.isTraceEnabled()) {
if (messageKind == IMessage.DEBUG) {
if (messageKind == IMessage.DEBUG) {
if (LOGGER.isDebugEnabled() || LOGGER.isTraceEnabled()) {
LOGGER.debug(makeMessageFor(message));
return true;
}
}
if (LOGGER.isInfoEnabled()) {
if ((messageKind == IMessage.INFO) || (messageKind == IMessage.WEAVEINFO)) {
else if ((messageKind == IMessage.INFO) || (messageKind == IMessage.WEAVEINFO)) {
if (LOGGER.isInfoEnabled()) {
LOGGER.info(makeMessageFor(message));
return true;
}
}
if (LOGGER.isWarnEnabled()) {
if (messageKind == IMessage.WARNING) {
else if (messageKind == IMessage.WARNING) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(makeMessageFor(message));
return true;
}
}
if (LOGGER.isErrorEnabled()) {
if (messageKind == IMessage.ERROR) {
else if (messageKind == IMessage.ERROR) {
if (LOGGER.isErrorEnabled()) {
LOGGER.error(makeMessageFor(message));
return true;
}
}
if (LOGGER.isFatalEnabled()) {
if (messageKind == IMessage.ABORT) {
else if (messageKind == IMessage.ABORT) {
if (LOGGER.isFatalEnabled()) {
LOGGER.fatal(makeMessageFor(message));
return true;
}

View File

@@ -39,6 +39,8 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
protected Advisor advisor;
protected boolean beforeExistingAdvisors = false;
private ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader();
/**
@@ -50,6 +52,19 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
private final Map<Class, Boolean> eligibleBeans = new ConcurrentHashMap<Class, Boolean>(64);
/**
* Set whether this post-processor's advisor is supposed to apply before
* existing advisors when encountering a pre-advised object.
* <p>Default is "false", applying the advisor after existing advisors, i.e.
* as close as possible to the target method. Switch this to "true" in order
* for this post-processor's advisor to wrap existing advisors as well.
* <p>Note: Check the concrete post-processor's javadoc whether it possibly
* changes this flag by default, depending on the nature of its advisor.
*/
public void setBeforeExistingAdvisors(boolean beforeExistingAdvisors) {
this.beforeExistingAdvisors = beforeExistingAdvisors;
}
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
}
@@ -74,7 +89,13 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
}
if (isEligible(bean, beanName)) {
if (bean instanceof Advised) {
((Advised) bean).addAdvisor(0, this.advisor);
Advised advised = (Advised) bean;
if (this.beforeExistingAdvisors) {
advised.addAdvisor(0, this.advisor);
}
else {
advised.addAdvisor(this.advisor);
}
return bean;
}
else {