From 5a266155b09f6ce65ae8dc3c4658c3a302f78037 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 15 Sep 2020 16:32:15 +0100 Subject: [PATCH] Disable proxyBeanMethods on Spring Session config sub-classes Closes gh-23280 --- .../autoconfigure/session/HazelcastSessionConfiguration.java | 4 ++-- .../boot/autoconfigure/session/JdbcSessionConfiguration.java | 4 ++-- .../session/MongoReactiveSessionConfiguration.java | 4 ++-- .../boot/autoconfigure/session/MongoSessionConfiguration.java | 4 ++-- .../session/RedisReactiveSessionConfiguration.java | 4 ++-- .../boot/autoconfigure/session/RedisSessionConfiguration.java | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/HazelcastSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/HazelcastSessionConfiguration.java index ea0493aca7..28c7c9d85a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/HazelcastSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/HazelcastSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -47,7 +47,7 @@ import org.springframework.session.hazelcast.config.annotation.web.http.Hazelcas @EnableConfigurationProperties(HazelcastSessionProperties.class) class HazelcastSessionConfiguration { - @Configuration + @Configuration(proxyBeanMethods = false) public static class SpringBootHazelcastHttpSessionConfiguration extends HazelcastHttpSessionConfiguration { @Autowired diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java index 855d57ca0d..d141586840 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -56,7 +56,7 @@ class JdbcSessionConfiguration { return new JdbcSessionDataSourceInitializer(dataSource, resourceLoader, properties); } - @Configuration + @Configuration(proxyBeanMethods = false) static class SpringBootJdbcHttpSessionConfiguration extends JdbcHttpSessionConfiguration { @Autowired diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoReactiveSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoReactiveSessionConfiguration.java index 8522edadff..73ecbf0119 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoReactiveSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoReactiveSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -43,7 +43,7 @@ import org.springframework.session.data.mongo.config.annotation.web.reactive.Rea @EnableConfigurationProperties(MongoSessionProperties.class) class MongoReactiveSessionConfiguration { - @Configuration + @Configuration(proxyBeanMethods = false) static class SpringBootReactiveMongoWebSessionConfiguration extends ReactiveMongoWebSessionConfiguration { @Autowired diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoSessionConfiguration.java index 2d2419cfac..5bdf15cd75 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/MongoSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -44,7 +44,7 @@ import org.springframework.session.data.mongo.config.annotation.web.http.MongoHt @EnableConfigurationProperties(MongoSessionProperties.class) class MongoSessionConfiguration { - @Configuration + @Configuration(proxyBeanMethods = false) public static class SpringBootMongoHttpSessionConfiguration extends MongoHttpSessionConfiguration { @Autowired diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration.java index 31be3bd28e..15edb73b3b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -43,7 +43,7 @@ import org.springframework.session.data.redis.config.annotation.web.server.Redis @EnableConfigurationProperties(RedisSessionProperties.class) class RedisReactiveSessionConfiguration { - @Configuration + @Configuration(proxyBeanMethods = false) static class SpringBootRedisWebSessionConfiguration extends RedisWebSessionConfiguration { @Autowired diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java index 9f73dbc73a..2d01e22ab6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -64,7 +64,7 @@ class RedisSessionConfiguration { "Unsupported redis configure action '" + redisSessionProperties.getConfigureAction() + "'."); } - @Configuration + @Configuration(proxyBeanMethods = false) public static class SpringBootRedisHttpSessionConfiguration extends RedisHttpSessionConfiguration { @Autowired