Rework @Configuration classes to be compatible with @Configuration(proxyBeanMethods=false)
See original GitHub issueJuergen has just merged support for @Configuration(proxyBeanMethods=false)
into Framework 5.2 snapshots. We’re going to make as much use of that as possible in Boot 2.2.0.M2 (https://github.com/spring-projects/spring-boot/issues/9068). There’s a configuration class in Boot where we need @Bean
methods to be proxied because they subclass a Spring Session configuration class that requires it. The class in question is o.s.b.a.s.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration
which is a subclass of o.s.s.d.r.c.a.w.h.RedisHttpSessionConfiguration
. Could you please consider reworking things in Spring Session so that the proxy isn’t needed?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
When to set proxyBeanMethods to false in Springs ...
In Springboot version 2 and onwards, all AutoConfiguration classes are configured with @Configuration(proxyBeanMethods = false).
Read more >Configuration (Spring Framework 6.0.2 API)
Indicates that a class declares one or more @Bean methods and may be processed by the Spring container to generate bean definitions and...
Read more >Understanding inter-bean method reference in Spring ...
Semantically a @Configuration class makes more sense. The @Configuration annotation allows you to define the proxyBeanMethods=false property to ...
Read more >Create configuration classes - Sitefinity CMS Development
Use this procedure to create your own configurations that you can then modify through the backend's Advanced settings.
Read more >CGLIB Proxying in Spring @Configuration - Java By Examples
In this quick tutorial, we'll talk about CGLIB proxying in Spring @Configuration classes. Mainly, we'll look at some practical examples, and then examine ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is now resolved thanks to Framework’s changes in
ImportAware
handling made in spring-projects/spring-framework#22920 (thanks for the ping @eleftherias).After taking a closer look at the problem, the originally reported problem will be fairly simple to address in
RedisHttpSessionConfiguration
and we’re going to do it in #1362.Reworking our
@Configuration
classes to be able to marked asproxyBeanMethods = false
is something that will require more substantial changes, mostly due to those classes implementingImportAware
. We’ll leave this issue open to track that effort.