Lets say we have a class
@RequestScope
public abstract class A {
int a;
}
and another class which extends the above class
@Service
public class B extends A {
public int getA () { return a; }
}
Is this class B's variable (that it is extending from A) is a request scoped variable?
UPD
I was going through the spring code, it says
/** * Constant for the default scope name: {@code ""}, equivalent to singleton * status unless overridden from a parent bean definition (if applicable). */ public static final String SCOPE_DEFAULT = "";
Also,
((AbstractBeanDefinition)((AnnotationConfigEmbeddedWebApplicationContext) ctx).
getBeanDefinition("b")).scope
returns "singleton"
but if I mark class B with @RequestScope
this property changes to ""
which i assume is sigleton
again