创建项目如图所示:

spring starter project (STS tools)构建工程 Cannot determine embedded database driver class for

目录结构如图:

spring starter project (STS tools)构建工程 Cannot determine embedded database driver class for


项目根目录右键 Run As - Spring Boot App提示 出错?

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-12-05 17:51:54.252 ERROR 30225 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE


open application.properties file 

add : spring.datasource.url=jdbc:mysql://localhost/Test_DB

or 

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

@SpringBootApplication
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class SpringBatchHelloWorldApplication {

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

相关文章:

  • 2022-12-23
  • 2021-08-17
  • 2021-10-13
  • 2021-09-09
  • 2021-12-23
  • 2021-03-31
  • 2021-04-06
猜你喜欢
  • 2021-10-01
  • 2022-02-06
  • 2021-06-23
相关资源
相似解决方案