springboot.ApplicationContext启动报错

springboot启动报错:"Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled."

开发工具: SpringToolSuite4(STS)
报错内容:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-11-09 12:25:02.528 ERROR 1436 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

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

这是我们在pom.xml 加入了以下依赖

		<dependency>
			<groupId>org.mybatis.spring.boot</groupId>>
			<artifactId>mybatis-spring-boot-starter</artifactId>
			<version>2.1.1</version>
		</dependency>

springboot.ApplicationContext启动报错_第1张图片
只要我们找到以下并且注释掉

		<dependency>
			<groupId>org.mybatis.spring.boot</groupId>
			<artifactId>mybatis-spring-boot-starter</artifactId>
			<version>2.1.1</version>
		</dependency>

如图:
springboot.ApplicationContext启动报错_第2张图片

运行Application.java,如下图则成功:
springboot.ApplicationContext启动报错_第3张图片

你可能感兴趣的:(springboot.ApplicationContext启动报错)