博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Cannot determine embedded database driver class for database type NONE
阅读量:6966 次
发布时间:2019-06-27

本文共 4527 字,大约阅读时间需要 15 分钟。

转自:https://www.cnblogs.com/kmsfan/p/7189626.html

017-05-04 11:22:54.957  INFO 6164 --- [           main] com.example.GirlApplication              : Starting GirlApplication on GOAFJLQVOL9HVXB with PID 6164 (E:\girl\target\classes started by Administrator in E:\girl)

2017-05-04 11:22:54.959  INFO 6164 --- [           main] com.example.GirlApplication              : The following profiles are active: dev
2017-05-04 11:22:55.155  INFO 6164 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6b4a4e18: startup date [Thu May 04 11:22:55 CST 2017]; root of context hierarchy
2017-05-04 11:22:56.182  INFO 6164 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-05-04 11:22:56.189  INFO 6164 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-05-04 11:22:56.190  INFO 6164 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-05-04 11:22:56.253  INFO 6164 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-05-04 11:22:56.254  INFO 6164 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1102 ms
2017-05-04 11:22:56.350  INFO 6164 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-05-04 11:22:56.353  INFO 6164 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-05-04 11:22:56.353  INFO 6164 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-05-04 11:22:56.353  INFO 6164 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-05-04 11:22:56.353  INFO 6164 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-05-04 11:22:56.381  WARN 6164 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "dev" are currently active).
2017-05-04 11:22:56.383  INFO 6164 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2017-05-04 11:22:56.397  INFO 6164 --- [           main] utoConfigurationReportLoggingInitializer : 
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-05-04 11:22:56.404 ERROR 6164 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "dev" are currently active).
Process finished with exit code 1

 

 

您好,这是因为你的 application.yml 文件中关于数据库的配置格式出错导致的。注意:datasource之前要有空格,也就是说完整的配置应该是 spring.datasource.driver-class-name.以下为我的配置:

spring:

 profiles:
   active: dev
 datasource:
   driver-class-name: com.mysql.jdbc.Driver
   url: jdbc:mysql://127.0.0.1:3306/ddgirl
   username: root
   password: root
 jpa:
   hibernate:
     ddl-auto: update
   show-sql: true

 

转载于:https://www.cnblogs.com/sharpest/p/7985992.html

你可能感兴趣的文章
Redisson官方文档 - 7. 分布式集合
查看>>
Centos6.7_KVM安装配置使用
查看>>
菜鸟学Linux 第066篇笔记 简单配置iptables
查看>>
screen
查看>>
支持免费的办公软件 IBM Symphony
查看>>
SQL Server 中函数的理解总结
查看>>
mysql5.1.X安装plugin
查看>>
Nginx+tomcat整合
查看>>
解决Vsphere Client 60天过期问题
查看>>
RDP error: This computer can’t connect to the remote computer
查看>>
Zabbix3.x安装图解教程
查看>>
linux rz sz 上传下载命令详解
查看>>
Know more about AWR Parse Statistics
查看>>
SElinux 配置与管理
查看>>
Script to Collect RAC Diagnostic Information (racdiag.sql)
查看>>
Linux对外连接端口数限制
查看>>
增加删除列列
查看>>
docker的资源隔离---cpu、内存、磁盘限制
查看>>
PMP考生最关心的八大问题
查看>>
SpringBoot启动分析
查看>>