Description:
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
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
My database configuration file is application.properties. after reading it seems to be unreadable, I recreate the application.yml file again, just copy the configuration file to this side yml. restart it and it’s fine.
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
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
My database configuration file is application.properties. after reading it seems to be unreadable, I recreate the application.yml file again, just copy the configuration file to this side yml. restart it and it’s fine.
server: port: 8080 spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/springcloud?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=UTC username: root password: 123456
I don’t know why.
Read More:
- [Solved] dynamic-datasource can not find primary datasource
- [Solved] ERROR com.alibaba.druid.pool.DruidDataSource – init datasource error, url jdbcmysql
- [Solved] init datasource error, url: jdbc:mysql://lcoalhost:3306/test com.mysql.cj.jdbc.exceptions.Com
- [Solved] public key is not available client side (option serverRsaPublicKeyFile not set)
- Using Mybatis to connect to the database error: Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver···
- MYSQL Slave is not configured or failed to initialize properly. You must at least set –server-id
- [Solved] zabbix configure: error: MySQL library not found
- [Solved] Error: ER_HOST_NOT_PRIVILEGED: Host ‘x.x.x.x‘ is not allowed to connect to this MySQL server
- [Solved] error {dataSource-1} init error java.sql.SQLException: com.mysql.cj.jdbc.Driver
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- Mybatis Error: The server time zone value ‘����1532a0’ is unrecognized
- Android connection to cloud MySQL error: java.lang.NoClassDefFoundError Failed resolution of LjavasqlSQLType
- [Solved] Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- [Solved] mysql 2003 remote access failed mysql8 configure remote access
- [Solved] Pyodbc.ProgrammingError: No results. Previous SQL was not a query.
- How to Solve Embulk Error: OutputPlugin’bigquery’ is not found
- Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 – Connection is not available, request timed out after 30005ms.
- Problems in connecting mysql8.0 in IDEA [How to Solve]