0

What is the difference between these 2 properties in spring ?

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

and

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL55Dialect

spring.datasource.driver-class-name property seems to work but in some siturations like putting a unquie constraint on column it doesn't work. Why?

kingGarfield
  • 304
  • 1
  • 12
  • https://stackoverflow.com/questions/21012799/why-do-i-need-to-configure-the-sql-dialect-of-a-data-source – Lesiak Mar 31 '20 at 07:33
  • @Lesiak great link ,but it just explains the dialect property not the driver-class-name. – kingGarfield Mar 31 '20 at 07:42
  • driver-class-name simply specifies which library is used to connect to the DB. Although the interfaces to SQL databases are standardised as JDBC, the details of implementation (wire protocol etc) vary between databases, hence the need for different drivers – Lesiak Mar 31 '20 at 07:45
  • @Lesiak thanks i got it.should i delete the question? – kingGarfield Mar 31 '20 at 09:00
  • There is nothing wrong with your question, SO is a good place for both basic and complicated problems – Lesiak Mar 31 '20 at 09:27

0 Answers0