当前位置: 首页 > 知识库问答 >
问题:

未能将“|”下的属性绑定到com.zaxxer.hikari.hikaridataSource Spring Boot

缑兴贤
2023-03-14
Description:

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

    Property: driverclassname
    Value: oracle.jdbc.OracleDriver
    Origin: "driverClassName" from property source "source"
    Reason: Unable to set value for property driver-class-name

Action:

Update your application's configuration
dependencies {
    compile "org.springframework.boot:spring-boot-starter-web"
    compile "org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1"
    testCompile "org.springframework.boot:spring-boot-starter-test"
}
spring.datasource.url= *****
spring.datasource.username= ******
spring.datasource.password= ******

共有1个答案

姜宏放
2023-03-14

我也有同样的问题(Spring Boot2),

我修正了添加驱动程序类。

查找application.properties文件。

spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=upate
spring.datasource.url=jdbc:mysql://localhost:3306/database_name
spring.datasource.username=admin
spring.datasource.password=admin1234
 类似资料:
  • 前一段时间我面临这样的问题: 我还应该说,我尝试了另一种形式的命令: 但结果是一样的。接下来应该做什么来克服这个问题并成功地启动容器?谢谢你的回答!!!

  • 我试图将子类属性绑定到GridViewColumn。我有一个母类M1和三个不同的子类S1、S2和S3。GridViewColumn由类M1的对象填充。我希望将S2的一个属性绑定到这个GridViewColumn的头,而M1中没有实现这个属性。 有人能给我解释一下怎么做吗?

  • 最好的办法是什么?根据显示的数据,我希望绑定到MyText1或MyText2。我怎么做“开关”?

  • 我正在开发一个简单的Java程序来完成一些简单的mySQL内容。它有一个用JavaFX制作的小GUI。 GUI的控制器有一个SimpleBoleanProperty,我们称之为X,它指示到数据库的连接状态。我将一些简单的东西绑定到它,比如按钮的disableProperty so send querys,如果没有连接,应该禁用它。到现在为止,一直都还不错。 我有一个标签,用于执行以下操作: 如果X

  • 如何在Spring Boot中将属性绑定到POJO? POJO类是第三方库类-我不能将@ConfigurationProperties放在那里 我知道一些实用程序类,如DataBinder,可以帮助,但可能有一个更快的方法。提前谢谢你。

  • servlet 可以按名称绑定对象属性到 HttpSession 实现,任何绑定到会话的对象可用于任意其他的 servlet,其属于同一个 ServletContext 且处理属于相同会话中的请求。 一些对象可能需要在它们被放进会话或从会话中移除时得到通知。这些信息可以从 HttpSessionBindingListener 接口实现的对象中获取。这个接口定义了以下方法,用于标识一个对象被绑定到会