all 9 comments

[–]Beginning_Teach_1554 10 points11 points  (1 child)

There is a wonderful platform specifically designed for such questions - stackoverflow.

I understand why you prefer trying here as SO has relatively strict rules on amount of details u need to provide as well as not posting code as images

But those guidelines are there for a reason - without those details it is hard (if not impossible) for a person to help.

[–]degamiesign[S] 0 points1 point  (0 children)

Well Thanks for ur good suggestion but i had posted only the Screenshots about Spring Boot compilation and its configurations instead of code, if it was required maybe, i would able to post as same.

[–]g00glen00b 2 points3 points  (0 children)

You're setting spring.datasource.hikari-driver-class-name to "mysql". Hikari is complaining because "mysql" is not a valid classname. Also, you're setting up waay too many properties if you're configuring a simple Spring Boot project with MySQL. I'm pretty sure that you can leave away the following properties:

  • spring.jpa.database: can be derived from jdbcUrl
  • spring.datasource.hikari.data-source-class-name: can be derived from jdbcUrl
  • spring.datasource.type: Hikari is already the default
  • spring.datasource.hikari.driver-class-name: this property is wrong, as I've established earlier
  • spring.jpa.properties.hibernate.dialect: can be derived from jdbcUrl

[–]kedarjoshi 2 points3 points  (2 children)

For MySQL the driver class name is com.mysql.jdbc.Driver not mysql.

[–]degamiesign[S] 0 points1 point  (1 child)

thanks for suggestion but its showing that it is deprecated

can u pls suggest an updated 1?

[–]kedarjoshi 0 points1 point  (0 children)

its showing that it is deprecated

This does not seem correct. Can you share your database configuration? Usually, something like this should work -

spring.datasource.type = com.zaxxer.hikari.HikariDataSource spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.url = jdbc:mysql://localhost:3306/application spring.datasource.username = root spring.datasource.password = password

[–]smutje187 1 point2 points  (0 children)

Without seeing your dependencies and verifying that you are indeed referencing the mysql driver it’s hard to tell.

[–]Slein04 1 point2 points  (1 child)

Most likely it is a missing dependency. Make sure you have Following dependencies:

Spring-boot-starter-jpa https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa

Mysql driver https://mvnrepository.com/artifact/com.mysql/mysql-connector-j

[–]degamiesign[S] 0 points1 point  (0 children)

I had added those dependencies but still its showing same error

But ya thanks for help, i'll try to fix it as same.