配置nacos错误:If configuration is not required add spring.config.import=optional:nacos: instead.

已连接到目标 VM, 地址: ''127.0.0.1:33487',传输: '套接字''
15:03:43.555 [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=nacos: property to your configuration.
	If configuration is not required add spring.config.import=optional:nacos: instead.
	To disable this check, set spring.cloud.nacos.config.import-check.enabled=false.

与目标 VM 断开连接, 地址为: ''127.0.0.1:33487',传输: '套接字''

进程已结束,退出代码1

添加依赖


        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bootstrap</artifactId>
            <version>4.0.1</version>
        </dependency>

你可能感兴趣的:(java,开发语言)