목차

Spring Bean Scope

prototype Scope

구현방법 Provider<T>

@Autowired
private Provider<PrototypeBeanClass> prototypeBeanClassProvider;
 
...
PrototypeBeanClass bean = prototypeBeanClassProvider.get();
...

@Lookup

@Component
public class SingletonLookupBean {
 
    @Lookup
    public PrototypeBean getPrototypeBean() {
        return null;
    }
}

request/session Scope