zoukankan      html  css  js  c++  java
  • 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

    解决方案:

    @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)

    作用://取消数据库配置

     但是

    在用到数据库的时候记得将他改为 @SpringBootApplication , 否则会报错:如下
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxController': Unsatisfied dependency expressed through field 'xxMapper';
    nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxMapper' defined in file [D:workspacesideapear argetclassescomwqqmapperxxMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
  • 相关阅读:
    CF1462E2 Solution
    CF1450D Solution
    CF1451D Solution
    CF1442B Solution
    CF1453C Solution
    CF1455D Solution
    linux服务器部署node项目
    原生javascript实现 hasClass addClass removeClass
    图片加载完执行函数
    MySQL
  • 原文地址:https://www.cnblogs.com/Sarah-Strawberry/p/11082159.html
Copyright © 2011-2022 走看看