강의

멘토링

커뮤니티

Inflearn Community Q&A

kkjaehwan0842's profile image
kkjaehwan0842

asked

Spring Framework Core Technologies

IoC Container Part 2: ApplicationContext and Various Bean Configuration Methods

코드 중 변수 앞에 적는 것이 무엇인지 알고 싶습니다.

Resolved

Written on

·

275

0

현재 STS사용중입니다.

8:23

ApplicationContext context = new ClassPathXmlApplicationContext(configLocation:"application.xml");

에서 "configLocation:"

BookService bookService= (BookService)context.getBean(s:"bookService");

에서 "s:"

예제로 배우는 스프링 입문 (개정판)에서도

AOP실습중 amount:100 이렇게 쓰셨었는데

STS에서는

작성하신 것처럼 작성하면

기본적으로 에러가 발생해서

해당부분을 아래와 같이 지우고 동작시켜보고 있습니다.

ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");

BookService bookService= (BookService)context.getBean("bookService");

마치 주석처럼 동작하는거 같은데

어떤 내용인지 알고 싶습니다.

javaspring

Answer 2

1

whiteship님의 프로필 이미지
whiteship
Instructor

아.. 그건 제가 적는게 아니라 인텔리J가 해당 값이 넘어가는 메소드의 파라미터 이름을 추론해서 보여주는 거에요. 말씀하신대로 주석처럼 생각하시면 되요.

0

TSJAY님의 프로필 이미지
TSJAY
Questioner

감사합니다! IntelliJ도 가능한 빨리 접해봐야겠네요😀

kkjaehwan0842's profile image
kkjaehwan0842

asked

Ask a question