Application Configuration - Tuong-Nguyen/Spring GitHub Wiki
public class AppConfig{
@Bean
public Team redSox(){
return new RedSox();
}
}
Subclass of AppConfig is generated and used.
Implementation for @Scope("singleton") as follow:
- Return RedSox instance if it is in the context
- If not, call super.redSox() to create an instance; add to context and return it.