Spring/error

[Spring Error 기록] Failed to configure a DataSource:

MOMOBOB 2020. 11. 20. 16:03
반응형
***************************
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 suitable jdbc url

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 L are currently active).

DB설정시 위와 같은 에러가 발생했다.

 

application.properties의 DB정보를 yml 형태를 복붙하여 수정했더니 아래의 모형이었다.

spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
spring.datasource.jdbc-url=jdbc:log4jdbc:oracle:thin:@localhost:1521:XE
spring.datasource.username=BNK_DB
spring.datasource.password=aa12345^

 

jdbc-urlurl로 바꾸니 에러가 사라졌다. 

 

 

추가적으로 driver-class-name를 driverClassName등으로 오입력 하였을 경우에도 같은 에러가 발생한다.

반응형