使用consul作为配置中心时启动报错

Connected to the target VM, address: '127.0.0.1:64697', transport: 'socket'
19:30:58.263 [main] DEBUG org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - Application failed to start due to an exception
org.springframework.cloud.consul.config.ConsulConfigDataMissingEnvironmentPostProcessor$ImportException: No spring.config.import set
    at org.springframework.cloud.consul.config.ConsulConfigDataMissingEnvironmentPostProcessor.postProcessEnvironment(ConsulConfigDataMissingEnvironmentPostProcessor.java:62)
    at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:100)
    at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:86)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
    at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
    at com.example.springtestproject.SpringTestProjectApplication.main(SpringTestProjectApplication.java:10)
19:30:58.266 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - 

***************************
APPLICATION FAILED TO START
***************************

Description:

No spring.config.import property has been defined

Action:

Add a spring.config.import=consul: property to your configuration.
    If configuration is not required add spring.config.import=optional:consul: instead.
    To disable this check, set spring.cloud.consul.config.enabled=false or 
    spring.cloud.consul.config.import-check.enabled=false.

Disconnected from the target VM, address: '127.0.0.1:64697', transport: 'socket'

Process finished with exit code 1

#bootstrap.yml
spring:
#  profiles:
#    active: dev
  application:
    name: ms-user
  cloud:
    consul:
      config:
        # 使用consul 作为配置中心,格式为yaml
        format: yaml
        enabled: true
      host: localhost
      port: 8500
# application.properties
server:
  port: 8081
spring:
#  profiles:
#    active: dev
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/ms_user
    username: root
    password: root
    driver-class-name: com.mysql.cj.jdbc.Driver
  jpa:
    hibernate:
    # 让 hibenate 不去操作表结构 ,否则启动时会自动建表
      ddl-auto: none
package com.example.springtestproject.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Value("${first.config:dev}")
    private String profile;

    @GetMapping("/getProfile")
    public String getProfile(){
        return this.profile;
    }
}