Upgrade to the latest SF and fix HTTP Reactive

https://build.spring.io/browse/INT-FATS5IC-206/

Also use `AopUtils.getTargetClass()` directly in the
`ReactiveHttpRequestExecutingMessageHandler` since it never returns `null`
This commit is contained in:
Artem Bilan
2017-06-21 10:43:36 -04:00
parent 42dd05d655
commit ecb7d03895
3 changed files with 4 additions and 8 deletions

View File

@@ -138,7 +138,7 @@ subprojects { subproject ->
springSecurityVersion = '5.0.0.M2'
springSocialTwitterVersion = '2.0.0.M2'
springRetryVersion = '1.2.0.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.0.RC2'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.0.BUILD-SNAPSHOT'
springWsVersion = '2.4.0.RELEASE'
tomcatVersion = "8.5.14"
xmlUnitVersion = '1.6'

View File

@@ -148,7 +148,8 @@ public class MessagingAnnotationPostProcessor implements BeanPostProcessor, Bean
@Override
public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException {
Assert.notNull(this.beanFactory, "BeanFactory must not be null");
final Class<?> beanClass = this.getBeanClass(bean);
Class<?> beanClass = AopUtils.getTargetClass(bean);
ReflectionUtils.doWithMethods(beanClass, method -> {
Map<Class<? extends Annotation>, List<Annotation>> annotationChains = new HashMap<>();
@@ -260,11 +261,6 @@ public class MessagingAnnotationPostProcessor implements BeanPostProcessor, Bean
return false;
}
protected Class<?> getBeanClass(Object bean) {
Class<?> targetClass = AopUtils.getTargetClass(bean);
return (targetClass != null) ? targetClass : bean.getClass();
}
protected String generateBeanName(String originalBeanName, Method method,
Class<? extends Annotation> annotationType) {
String baseName = originalBeanName + "." + method.getName() + "."

View File

@@ -119,7 +119,7 @@ public class ReactiveHttpRequestExecutingMessageHandler extends AbstractHttpRequ
WebClient.RequestBodySpec requestSpec =
this.webClient.method(httpMethod)
.uri(b -> uriSupplier.get())
.headers(httpRequest.getHeaders());
.headers(headers -> headers.putAll(httpRequest.getHeaders()));
if (httpRequest.hasBody()) {
requestSpec.body(BodyInserters.fromObject(httpRequest.getBody()));