最近在使用springboot时报了个错Failed to bind properties under '' to com.zaxxer.hikari.Hikari DataSource,经过分析和排查,最终将处理办法记录下来,并分享给大家。
在使用 Spring Boot 连接 MySQL 或其他数据库时,出现以下错误:
*************************** APPLICATION FAILED TO START *************************** Description: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource: Property: driverclassname Value: null Origin: "driverClassName" from property source "source" Reason: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalArgumentException: Could not load JDBC driver class [null] Property: url Value: null Origin: "url" from property source "source" Reason: Property 'url' threw exception; nested exception is java.lang.IllegalArgumentException: url is required. Property: username Value: null Origin: "username"