OpenAI를 build.gradle에 추가 시 발생하는 에러
- 아래의 코드를 build.gradle에 추가하고, 실행했을 때 다음과 같은 에러 발생
dependencies {
// OpenAI
implementation 'io.github.flashvayne:chatgpt-spring-boot-starter:1.0.1'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
}
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (the profiles API-KEY are currently active).
Process finished with exit code 1
- 해결방법
- 데이터베이스 관련 설정하기
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${url}
username: ${username}
password: ${pasword}