spring (1) 썸네일형 리스트형 Generic Methods를 통해 Spring Bean을 casting 없이 처리하는 Utility 클래스 Generics를 사용하면 여러 개별적인 데이터 타입들을 아우르는 공통 기능을 손쉽게 만들 수 있다. 그 중에서 잘 사용되진 않지만 static 메소드에 파라미터의 타입을 통해 리턴 타입을 처리할 수 있는 generic method를 사용하면 객체가 아닌 메소드 수준에서 generics를 손쉽게 적용할 수 있다. 이를 활용하여 casting 없이 지정한 타입을 통해 바로 Spring Bean 객체를 얻어오는 유틸리티 클래스를 만들 수 있다. import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.Applicatio.. 이전 1 다음