-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
33강 jpa 질문입니다
23.08.01 10:16 작성 조회수 220
0
33강 하고 있는데요..디비 설정부분에서 에러가 납니다.
데이터소스 설정이 안되어있다고 하는거 같은데...몇 번을 뒤져봤는데도 제 눈에는 안 보네요..ㅠ
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 (no profiles are currently active).
build,gradle의 디펜던시입니다
dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'com.oracle.database.jdbc:ojdbc8' }
의존성은
dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'com.oracle.database.jdbc:ojdbc8' }
persistence 설정은 아래와 같습니다..
<properties>
<property name="jakarta.persistence.jdbc.driver"
value="oracle.jdbc.OracleDriver" />
<property name="jakarta.persistence.jdbc.url"
value="jdbc:oracle:thin:@localhost:1521:xe" />
<property name="jakarta.persistence.jdbc.user" value="scott" />
<property name="jakarta.persistence.jdbc.password" value="tiger" />
<property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle12cDialect" />
답변을 작성해보세요.
0
이재환
지식공유자2023.08.02
수업에서 사용하는 데이터베이스가 오라클인데, 오라클 SQL디벨로퍼에서 먼저 접속이 잘 되는지 확인해 보시기 바랍니다. 이 예제의 설정은 앞의 예제인 JDBC, MyBatis 등에서도 같은 설정을 사용했기 때문에, 앞의 예제가 되었다면 여기서 안 될 이유는 없습니다.
답변 2