alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.83k stars 8.32k forks source link

警告信息--Dubbo Spring Cloud #1278

Closed maxiaodong58 closed 4 years ago

maxiaodong58 commented 4 years ago

版本信息,父级 pom

<dependency>  
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-dependencies</artifactId>
   <version>2.2.2.RELEASE</version>
   <type>pom</type>
   <scope>import</scope>
</dependency>
<dependency>
   <groupId>com.alibaba.cloud</groupId>
   <artifactId>spring-cloud-alibaba-dependencies</artifactId>
   <version>2.2.0.RELEASE</version>
   <type>pom</type>
   <scope>import</scope>
</dependency>

子模块, pom

        <dependency>
            <groupId>com.xiaodong.cloud</groupId>
            <artifactId>spring-cloud-dubbo-api</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-dubbo</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>

启动类,代码


import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@EnableDubbo
@EnableDiscoveryClient
@SpringBootApplication
public class DubboSpringCloudServerBootstrap {

    public static void main(String[] args) {
        // 启动类
        SpringApplication.run(DubboSpringCloudServerBootstrap.class, args);
    }
}

项目启动,控制台打印警告信息

2020-03-22 02:07:45.433 WARN 16092 --- [ main] o.a.d.c.s.e.SpringExtensionFactory : [DUBBO] No spring extension (bean) named:applicationContext, try to find an extension (bean) of type org.springframework.context.ConfigurableApplicationContext, dubbo version: 2.7.4.1, current host: 192.168.3.4

maxiaodong58 commented 4 years ago

image

mercyblitz commented 4 years ago

Never mind, that information came from the Dubbo framework. You'd better report this issue on here if necessary.