@SpringBootApplication(scanBasePackages="com.*.*")
@EnableScheduling
@EnableTransactionManagement
@MapperScan("com.*.**.*mapper")
@EnableConfigurationProperties({CustomConfiguration.class})
public class Application {}
SpringBootApplication
Spring注解的扫描路径EnableScheduling
开启Spring的定时任务EnableTransactionManagement
开始Spring的事务管理MapperScan
扫描MyBatis Mapper类的路径EnableConfigurationProperties
自定义配置文件映射类