처음 IntelliJ에 프로젝트를 생성해서 실행을 하면 위와 같이 에러 메세지가 나온다

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 

에서 볼 수 있듯, DB 연결이 되지 않아서 발생하는 에러

 

 

 

 

 목차

  1. MySQL 연동
    1. MySQL Workbench에 데이터베이스 생성
    2. IntelliJ의 application.yml 설정
  2. Hello World 띄우기
    1. controller/HelloController 
    2. resources/templates/hello.html

 

 

 

1. MySQL 연동

  1. MySQL Workbench에 데이터베이스 생성
  2. IntelliJ의 application.yml 설정
  3. 정상 작동 확인

 

MySQL Workbench에 데이터베이스 생성

 

IntelliJ의 application.yml 설정

 

정상 작동 확인

 

 

2. Hello World 띄우기

  1. controller/HelloController
  2. resources/templates/hello.html
  3. 정상 작동 확인

 

controller/HelloController

 

resources/templates/hello.html

 

정상 작동 확인

'IT 언어 > IntelliJ' 카테고리의 다른 글

[IntelliJ] Spring Boot 초기 세팅 (start spring)  (0) 2024.07.19
[IntelliJ] 설치하기 (Mac 💻)  (0) 2024.07.19

+ Recent posts