Spring boot - MySQL settings are not working

前端 未结 4 984
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-19 00:59

I am trying to develop an application using Spring boot and MySQL. As the documentation said, First I created the project using Spring initializr using Intelij Idea, configu

4条回答
  •  面向向阳花
    2021-01-19 01:36

    You need to add below code in application.properties and open your xammp/wamp or server then create yourdatabase for example studentdb same name give in application.properties file

    spring.datasource.url=jdbc:mysql://localhost:3306/yourdatabase
    spring.datasource.username=root
    spring.datasource.password=   
    spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    spring.jpa.database-platform = org.hibernate.dialect.MySQL5Dialect
    spring.jpa.generate-ddl=true
    spring.jpa.hibernate.ddl-auto = update
    

提交回复
热议问题