Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified

后端 未结 12 1623
逝去的感伤
逝去的感伤 2020-12-23 16:39

I have created a basic spring boot application from SPRING INITIALIZR with the Web, MongoDB and JPA dependencies.

When I try to run the spring boot

12条回答
  •  滥情空心
    2020-12-23 17:02

    @Bhabadyuti Bal give us a good answer, in gradle you can use :

    compile 'org.springframework.boot:spring-boot-starter-data-jpa' 
    compile 'com.h2database:h2'
    

    in test time :

    testCompile 'org.reactivecommons.utils:object-mapper:0.1.0'
    testCompile 'com.h2database:h2'
    

提交回复
热议问题