zoukankan      html  css  js  c++  java
  • Cannot determine embedded database driver class for database type NONE

    Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
    2017-11-29 14:26:34.478 ERROR 29736 --- [           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 (no profiles are currently active).

    因为启动springboot时候,会默认使用一个嵌入的数据库驱动,但是需要配置.

    我出现报错的原因是没有读取我自己写的配置文件,所以才会出现这样的错误.网上百度的方法挺多的,但是没有找到适合自己的.

    引入如下配置在yml文件中:可以正确的读取自己的配置文件:

    spring:
      profiles:
        active: zhongguo #这里需要写成你自己的配置文件的名字
      datasource:
        type: com.alibaba.druid.pool.DruidDataSource
  • 相关阅读:
    滚动加载图片
    轮播图
    各种插件
    IE兼容
    文字换行
    CSS3 transform用法
    隐藏手机号中间几位数
    js实现收藏,首页等功能
    loading练习
    animation练习
  • 原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11546861.html
Copyright © 2011-2022 走看看