문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
springframework:scope [2012/11/14 11:49] kwon37xi |
springframework:scope [2018/09/17 18:03] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Spring Bean Scope ====== | ====== Spring Bean Scope ====== | ||
| - | ===== prototype ===== | + | * [[https:// |
| + | |||
| + | ===== prototype | ||
| * 매번 객체 새로 생성할 필요가 있을 경우 사용한다. | * 매번 객체 새로 생성할 필요가 있을 경우 사용한다. | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| - | ===== request/ | + | ==== 구현방법 Provider< |
| + | <code java> | ||
| + | @Autowired | ||
| + | private Provider< | ||
| + | |||
| + | ... | ||
| + | PrototypeBeanClass bean = prototypeBeanClassProvider.get(); | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ==== @Lookup ==== | ||
| + | * '' | ||
| + | |||
| + | <code java> | ||
| + | @Component | ||
| + | public class SingletonLookupBean { | ||
| + | |||
| + | @Lookup | ||
| + | public PrototypeBean getPrototypeBean() { | ||
| + | return null; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== request/ | ||
| * 웹 Request/ | * 웹 Request/ | ||
| + | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * '' | ||