Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

前端 未结 28 2636
天命终不由人
天命终不由人 2020-11-30 19:57

I am working on a Spring Boot Batch example with MongoDB and I have already started the mongod server.

When I launch my application, I

28条回答
  •  醉酒成梦
    2020-11-30 20:36

    For spring boot version 2.X.X below configuration worked for me.

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

    Old jdbc driver is deprecated. The new one is mentioned on above configuration. Please use the same and restart the project.

提交回复
热议问题