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

后端 未结 12 1622
逝去的感伤
逝去的感伤 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 16:52

    In gradle build i simply:

    compile('org.springframework.boot:spring-boot-starter-data-jpa') compile('org.springframework.boot:spring-boot-starter-security') compile('org.springframework.boot:spring-boot-starter-web') compile('org.springframework.boot:spring-boot-devtools')

    removed

    **`compile('org.springframework.boot:spring-boot-starter-data-jpa')`**
    

    and it worked for me.

提交回复
热议问题