Spring Boot 프로젝트도 생성하고 JDK도 설치하고 DB도 설치했다...
근데 에러가뜬다...
이유는
Description:
기술:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
데이터 소스를 구성하지 못했습니다. 'url'속성이 지정되지 않았으며 포함 된 데이터 소스를 구성 할 수 없습니다.
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.
임베디드 데이터베이스 (H2, HSQL 또는 Derby)를 원하면 클래스 경로에 넣으십시오.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
특정 프로필에서로드 할 데이터베이스 설정이있는 경우 활성화해야 할 수 있습니다 (현재 활성화 된 프로필 없음).
라고한다...(구글 번역)
뭐 하여튼... 빨간색이 중요하다.
Spring Boot 추가 설정을 해줘야 하는것..
여기 보이는 application.properties에
DB연결 설정을 해주자.
spring.datasource.hikari.maximum-pool-size=10
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=1234
오라클이던 mysql이던 구글링하면 나오니 알아서 찾아 써넣자.
저장하고 다시 하면 잘된다.
인터넷 주소창에 localhost:8080 에 접속 후 요런페이지가 뜨면 완료
github.com/brettwooldridge/HikariCP
brettwooldridge/HikariCP
光 HikariCP・A solid, high-performance, JDBC connection pool at last. - brettwooldridge/HikariCP
github.com
자세한 설정을 원하는 경우 HikariCP를 확인해보자
(커넥션풀에 대해서도 찾아보자...)
'Spring Boot > Intellij' 카테고리의 다른 글
Cannot resolve method 'run(java.lang.Class, String[])' (0) | 2021.02.14 |
---|---|
Spring Boot Project 생성 (Intellij community 2020.3.2) (0) | 2021.02.12 |