본문 바로가기
코딩이야기/웹알아보기

springboot jdbc 미 설정시 발생 에러

by GiraffeB 2018. 9. 28.

springboot 에서 web과 jdbc를 옵션에서 선택하고, 데이터베이스에 대한 아무런 설정을 하지 않고 실행시 아래와 같은 에러가 뜬다.




***************************

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 (no profiles are currently active).



Process finished with exit code 1



디비 설정 후 다시 실행할 것


https://docs.spring.io/spring-boot/docs/2.0.5.RELEASE/reference/htmlsingle/#boot-features-configure-datasource


mysql jdbc 설정하기.


DataSource configuration is controlled by external configuration properties in spring.datasource.*. For example, you might declare the following section inapplication.properties: