SpringBoot去除数据源

代码如下

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
public class Application {
public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }
}

 欢迎关注作者微信公众号

 

posted @ 2021-08-22 17:23  沾青先生  阅读(1471)  评论(0编辑  收藏  举报