Interview_literal/StringBuilder/Exception
✅ String literal과 new String(““)의 차이 String literal: saved in constant pool new String(""): saved in memory heap constant pool에 저장되면 동일한 문자열에 대해서는 하나의 참조를 재사용 constant pool에서는 같은 ...
✅ String literal과 new String(““)의 차이 String literal: saved in constant pool new String(""): saved in memory heap constant pool에 저장되면 동일한 문자열에 대해서는 하나의 참조를 재사용 constant pool에서는 같은 ...
✅ Charecteristics of Java OOP Polymorphism: single function can behave differently depending on the context, overriding(dynamic, runtime) and overloading(static, compile time) ...
✅ Why use docker? 각 프로그램을 독립적인 컨테이너 환경에 이미지로 패키징하여 실행 Portability: can install program regardless of environment no collision among other programs solves “it works on my machine” probl...
✅ Scope how many instances of a bean Spring should create and how long they should live 빈이 존재부터 언제까지 존재하는지 존재할 수 있는 범위 ✔️ singleton: default. One instance per Spring container. ✔️ pro...
✅ Bean Life cycle steps Spring goes through to manage a bean: from creation to destruction 객체 생성 먼저 ➡️ 이후 의존관계 주입(setter) constructor로 DI할 때는 객체 생성할 때 의존관계 주입 ✔️ Bean Life cycl...
✅ Bean이 null인 경우 처리 방법 to make bean null @Autowired히고 SpringBean을 넣을지, 안 넣을지 정할 수 있다 💡 Required = false Member이 null이면 setter을 호출하지 않음 @Autowired(required = false) public void s...
✅ 4 Ways to inject dependency constructor setter field method 💡Constructor dependency injection 👍🏻 recommended Injected at the moment when object is created with constuctor 👍🏻 o...
💡 How to add Bean @Bean등록하는 방법 1️⃣ manual bean configuration with @Configuration 2️⃣ component scan with @ComponentScan, @Autowired 이 게시글에서는 2️⃣번 방법에 대해 설명 ✅ Component Scan Spring d...
✅ Singleton create only one instance(object) of its kind and share among other code, providing a single point of access public class SingletonService { //create myself within myself ...
✅ Spring Container and Bean ✔️ Spring container: manage object creation and DI and overall flow of the application Spring container 🟰 ApplicationContext ✔️ Bean: Objec...