Spring/Spring Boot

[Spring Boot] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured ์—๋Ÿฌ

natrue 2020. 9. 3. 17:42
728x90

 
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

 

 

 

 

ํ”„๋กœ์ ํŠธ๊ฐ€ ์ƒ์„ฑ๋  ๋•Œ appliction.properties ํŒŒ์ผ์ด ์ž๋™ ์ƒ์„ฑ๋œ๋‹ค.

( = ์ฆ‰ appliction.properties ํŒŒ์ผ์— JDBC datasource๋‚ด์šฉ์ด ์—†์–ด์„œ ๋œฌ ์—๋Ÿฌ)

 

***************************
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

 

 

JDBC ์„ค์ •์„ ์•„์ง ํ•˜์ง€์•Š์•˜๊ณ ,

ํ…Œ์ŠคํŠธ๋กœ

์„œ๋ฒ„๋งŒ ์‹คํ–‰ํ•˜๊ธฐ ์›ํ•  ๋•Œ ์“ฐ๋Š” ๋ฐฉ๋ฒ•..

 

Main Class๋ฅผ ์—ด๊ณ  

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@SpringBootApplication
public class DemoProjectApplication {

	public static void main(String[] args) {
		SpringApplication.run(DemoProjectApplication.class, args);
	}
}

 

์–ด๋…ธํ…Œ์ด์…˜์„ ์ถ”๊ฐ€ ํ›„

import ํ•ด์ฃผ๋ฉด ๋ 


import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;


@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

 

 

์ฐธ๊ณ  :  https://lemontia.tistory.com/586

'Spring > Spring Boot' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Spring Boot] Spring Tools 4 ์„ค์น˜ ๋ฐ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ  (2) 2020.09.02