Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'openai.key' in value "${openai.key}"
PropertySource("classpath:application.yaml") 설정 했으나 해결 안되서
run -> edit configuration에서 active profile에 dev 설정했더니, 에러 내용 달라짐
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'openAiChatModel' defined in class path resource [org/springframework/ai/autoconfigure/openai/OpenAiAutoConfiguration.class]:
Failed to instantiate [org.springframework.ai.openai.OpenAiChatModel]:
Factory method 'openAiChatModel' threw exception with message: OpenAI API key must be set
Caused by: java.lang.IllegalArgumentException: OpenAI API key must be set
3. 처음 스타터에서 설정한 openai 라이브러리 사전 설정으로 인한 에러 같음. 해당 라이브러리 사용 안 할 예정이라 제거함
에러 1
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'openai.key' in value "${openai.key}"
Caused by: java.lang.IllegalArgumentException: OpenAI API key must be set