Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @Scope(proxyMode) during component-scanning/autowiring lifecycle [SPR-5550] #10221

Closed
spring-projects-issues opened this issue Mar 6, 2009 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Chris Beams opened SPR-5550 and commented

In order to support @Configuration class processing, the following is now possible:

@Configuration
public class Config {
    @Bean @Scope(value=StandardScopes.SESSION, proxyMode=ScopedProxyMode.TARGET_CLASS)
    public Foo foo() {
        return new Foo();
    }
}

The same should also be true when @Scope is used at the type level:

@Component
@Scope(value=StandardScopes.SESSION, proxyMode=ScopedProxyMode.TARGET_CLASS)
public class Foo {
    // ...
}

The latter case is not yet supported.

Note that if a type 'Foo' is type annotated with @Scope, that annotation is ignored during @Configuration class processing. @Scope (or the lack thereof) at the method level in conjunction with a @Bean annotation is the only metadata that is respected.


No further details from SPR-5550

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants