상세 컨텐츠

본문 제목

디렉토리 생성을 source folder를 이용하여 한 후 folder 아래에 파일을 생성 한 후 접근하는 방법

보안/java

by MustThanks 2023. 9. 26. 01:52

본문

반응형


STS( or 이클립스) 에서 source folder 로 config 생성 이후 config 아래 beans.xml 파일을 생성하면 프로그램에서 
beans.xml에 접근하려려고 하면 아래와 같이 경로를 잡아주어야 오류가 없음

//IOC 컨테이너
ApplicationContext context = new GenericXmlApplicationContext("beans.xml");

@ContextConfiguration(locations="classpath:beans.xml")

관련글 더보기

댓글 영역