Skip to content

Application Configuration

Tuong-Nguyen edited this page Apr 24, 2017 · 2 revisions

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.

Clone this wiki locally