Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package

* WARNING * : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

//如果有这个错误,肯定是这里没有定义package
package org.microservice.tcbj.yytsg.gene;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableEurekaClient
@EnableFeignClients
public class GeneApplication {

    public static void main(String[] args) {
        SpringApplication.run(GeneApplication.class,args);
    }
}

加上去就能成功启动了

相关推荐
©️2020 CSDN 皮肤主题: 博客之星2020 设计师:CY__ 返回首页