[spring boot] Reason: Failed to determine suitable jdbc url 또는 jdbcUrl is required with driverClassName 발생시
2022. 1. 11. 16:28ㆍIT개발/Spring & Spring Security
반응형
***************************
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 (no profiles are currently active).
위 처럼 오류 발생시, application.properties 또는 yml 파일내 url 네이밍을 아래처럼 변경해보라!
( driver-class-name은 보나스 )
#before
spring.datasource.driverClassName = org.mariadb.jdbc.Driver
spring.datasource.jdbcUrl = jdbc:mariadb://localhost:3306/study
...
...
#after
spring.datasource.driver-class-name = org.mariadb.jdbc.Driver
spring.datasource.jdbc-url = jdbc:mariadb://localhost:3306/study
...
...
spring boot 예전엔 저렇게 네이밍을 썼나봐... (참고로 spring boot 2.6.2 사용중)
반응형