Preloader image
DDD

자바

흔히보는 APPLICATION FAILED TO START 오류

작성자 관리자 (admin)
조회수 1,212
입력일 2025-04-22 09:04:54

아래의 오류는 데이터베이스 설정이 없어서 출력되는 오류입니다.
application.properties 또는 application.yaml 파일에 데이터 점속 설정을하면 해결됩니다.

-- error start --
***************************
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).

--- error end ---

application.properties 또는 application.yaml 파일에 데이터 점속 설정

application.yaml
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/your_db_name
    username: your_user
    password: your_password
    driver-class-name: com.mysql.cj.jdbc.Driver

application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/your_db_name
spring.datasource.username=your_user
spring.datasource.password=your_password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver