Bean scopes

https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s04.html#beans-factory-scopes-request

Scope Description
singleton Scopes a single bean definition to a single object instance per Spring IoC container.

스프링 IoC Container 상에서 오직 하나만 존재하는 Bean, 기본값 | | prototype | Scopes a single bean definition to any number of object instances.

하나의 bean 정의에 대해 여러개의 객체가 생성될 수 있음, 보통 proxyMode(request)를 이용해서 api request별로 객체를 생성 및 관리한다. | | request | Scopes a single bean definition to the lifecycle of a single HTTP request; that is each and every HTTP request will have its own instance of a bean created off the back of a single bean definition. Only valid in the context of a web-aware Spring ApplicationContext.

하나의 HTTP Request의 생명 주기 안에 단 하나의 Bean 객체만 생성 될 수 있음, spring web mvc를 활용하는 선에서만 유효(Web-aware Spring ApplicationContext)하다. | | session | Scopes a single bean definition to the lifecycle of a HTTP Session. Only valid in the context of a web-aware Spring ApplicationContext.

하나의 HTTP Session의 생명 주기 안에 단 하나의 Bean 객체만 생성 될 수 있음, request보다 더 큰 범위. spring web mvc를 활용하는 선에서만 유효(Web-aware Spring ApplicationContext)하다. | | global session | Scopes a single bean definition to the lifecycle of a global HTTP Session. Typically only valid when used in a portlet context. Only valid in the context of a web-aware Spring ApplicationContext.

하나의 Global HTTP Session의 생명 주기 안에 단 하나의 Bean 객체만 생성 될 수 있음, session보다 큰 범위(일반적으로 portlet context 안에서만 유효함)지만 잘 사용되진 않음. spring web mvc를 활용하는 선에서만 유효(Web-aware Spring ApplicationContext)하다. |

singleton scope

Untitled

prototype scope

Untitled

singleton Vs. prototype

https://gmlwjd9405.github.io/2018/11/10/spring-beans.html

scope proxyMode

https://atoz-develop.tistory.com/entry/Spring-빈의-Scope-싱글톤과-프로토타입

JWT

Token based authentication (JWT structure)

https://velog.io/@cada/토근-기반-인증에서-bearer는-무엇일까