package com.steerinfo; import com.steerinfo.config.druidConfig.DruidConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.hystrix.EnableHystrix; import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication(scanBasePackages = "com.steerinfo.**") @MapperScan("com.steerinfo.**")//该注解会扫描 mapper 包下的接口,把接口生成代理对象并加入到 spring 容器中 @EnableConfigurationProperties(DruidConfig.class)//手动开启druid数据源 @EnableHystrix @EnableCaching @EnableFeignClients @EnableEurekaClient public class DataSouceApplication { public static void main(String[] args) { SpringApplication.run(DataSouceApplication.class, args); } }