@Scope @Documented @Retention(value=RUNTIME) @Target(value={TYPE,METHOD,PARAMETER}) public @interface RequestScoped
Mark a class whose instance, when get injected into program, should be instantiated only once per user request
Note we make it apply to ElementType.PARAMETER
by intention so in a controller method we can specify a class (e.g. a collection) as session scoped and framework can keep build up the bean across multiple requests in the same session. Instead of replacing the bean instance everytime with each new request
Scope
Copyright © 2016–2018 OSGL (Open Source General Library). All rights reserved.