Pages

Showing posts with label Spring. Show all posts
Showing posts with label Spring. Show all posts

Friday, 14 July 2023

Spring Bean Scopes

 

  • @Bean & @Scope("singleton") or @Bean
  • @Bean & @Scope("prototype")
  • @Bean & @Scope("request") or @Component & @RequestScope
  • @Bean & @Scope("session") or @Component & @SessionScope
  • @Bean & @Scope("application") or @Component & @ApplicationScope
  • @Component & @Scope("websocket")

Code Review

 SOLID Principles S – Single Responsibility Principle There should never be more than one reason for a class to change. O – Open-Closed Prin...