zoukankan      html  css  js  c++  java
  • Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embe

     1 Caused by: 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 "local" are currently active).
     2     at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:247)
     3     at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:184)
     4     at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:42)
     5     at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat.dataSource(DataSourceConfiguration.java:56)
     6     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     7     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     8     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     9     at java.lang.reflect.Method.invoke(Method.java:498)
    10     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    11     ... 116 common frames omitted

    报错原因:项目的bootstrap.yml中,config-server没有配置正确(如下14行):应该配置为config-server的名字,我配置成了项目名称

     1 spring:
     2   profiles:
     3     active: local
     4   application:
     5     name: xxx-server
     6   cloud:
     7     config:       
     8       name: ${spring.application.name}
     9       profile: ${config.profile:dev}
    10       username: ${myauth.config.username}
    11       password: ${myauth.config.password}
    12       discovery:
    13         enabled: true #使用服务发现组件中的Config Server,默认false
    14         service-id: config-server  #Config Server的名字,默认configserver    
  • 相关阅读:
    Jenkins file一行代码部署.NET程序到K8S
    重新认识Docker Compose之Sidecar模式
    handycontrol中NumericUpDown无法显示自定义错误提示的解决办法
    InstallShield打包.net项目无法包含数据库、配置文件等
    CROSS APPLY & OUTER APPLY
    C# 取消文件隐藏并恢复标准文件
    C#播放音乐的几种方式
    QT 信号(槽)绑定的使用_connect
    基于TestStand和C#开发平台TTStand 2.5.3.2 Release
    Task 使用详细[基础操作,异步原则,异步函数,异步模式] 更新中...
  • 原文地址:https://www.cnblogs.com/mySummer/p/9438414.html
Copyright © 2011-2022 走看看