2024-03-28 14:07:57 +08:00
|
|
|
|
package com.atguigu.cart;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
2024-03-28 14:39:27 +08:00
|
|
|
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
2024-03-28 14:07:57 +08:00
|
|
|
|
|
|
|
|
|
// 排除数据库的自动化配置,Cart微服务不需要访问数据库
|
2024-03-28 14:39:27 +08:00
|
|
|
|
@ComponentScan("com.atguigu")
|
2024-03-28 14:07:57 +08:00
|
|
|
|
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
2024-03-28 14:39:27 +08:00
|
|
|
|
@EnableFeignClients(basePackages = {"com.atguigu"})
|
2024-03-28 14:07:57 +08:00
|
|
|
|
public class CartApplication {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
SpringApplication.run(CartApplication.class, args);
|
|
|
|
|
}
|
|
|
|
|
}
|