package com.ks.push; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; import org.mybatis.spring.annotation.MapperScan; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.transaction.annotation.EnableTransactionManagement; @SpringBootApplication @EnableTransactionManagement @MapperScan(basePackages = "com.ks.push.mapper") @EnableDubbo(scanBasePackages = "com.ks.push.service.remote") public class PushApplication implements ApplicationListener { private final static Logger logger = LoggerFactory.getLogger(PushApplication.class); public static void main(String[] args) { SpringApplication.run(PushApplication.class, args); logger.info("应用启动成功"); } @Override public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) { logger.info("容器加载完毕"); } }