cari

Rumah  >  Soal Jawab  >  teks badan

java - 使用spring-boot-devtools时报错?

报错信息

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'inMemoryDatabaseShutdownExecutor' defined in class path resource [org/springframework/boot/devtools/autoconfigure/DevToolsDataSourceAutoConfiguration.class]: 
Unsatisfied dependency expressed through constructor argument with index 1 of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]:
 No qualifying bean of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] found for dependency: 
expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {};
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] 
found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]
 found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

我的配置主要是:
` <parent>

    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.3.RELEASE</version>
</parent>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
</dependency>`

idea中设置了
1.settings-->Complier--->勾选Make Project Automatically
2.Shift+Ctrl+Alt+/,选择Registry,勾选compiler.automake.allow.when.app.running
本地仓库也有了spring-boot-devtools的jar包;我自建的springboot项目使用的是1.4版本可以成功,但是在我们现在开发的项目中集成失败

迷茫迷茫2770 hari yang lalu1062

membalas semua(1)saya akan balas

  • 大家讲道理

    大家讲道理2017-04-18 10:27:35

    a) Adakah versi spring-boot yang sepadan betul?

    b) Sama ada pemalam telah ditambahkan dan atribut <fork>true</fork>

    c) Sama ada Eclipse Project telah dihidupkan secara Automatik (Saya sendiri terperangkap di sini, saya tidak tahu mengapa alat saya mematikan fungsi kompilasi automatik apabila).

    d) Jika SpringApplication.setRegisterShutdownHook(false) ditetapkan, mula semula automatik tidak akan berfungsi.

    balas
    0
  • Batalbalas