package com.xynet.marketing; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @SpringBootApplication @EnableDiscoveryClient // 开启事物注解,在service方法上加@Transactional(rollbackFor = Exception.class) @EnableTransactionManagement @EnableFeignClients @EnableScheduling @MapperScan("com.xynet.marketing.mapper") public class MarketingApplication { public static void main(String[] args) { SpringApplication.run(MarketingApplication.class, args); } }