| 123456789101112131415161718192021222324252627282930313233343536 |
- package com.energy.manage.service;
- import com.dtflys.forest.springboot.annotation.ForestScan;
- import com.energy.manage.common.mapper.MyMapper;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
- import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.EnableAspectJAutoProxy;
- import org.springframework.kafka.annotation.EnableKafka;
- import org.springframework.scheduling.annotation.EnableAsync;
- import org.springframework.transaction.annotation.EnableTransactionManagement;
- import tk.mybatis.spring.annotation.MapperScan;
- @EnableKafka
- @EnableDiscoveryClient
- @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
- @EnableAspectJAutoProxy(exposeProxy = true)
- @EnableTransactionManagement
- @EnableAsync
- // com.energy.manage.common 中承载了与 energy-manage-healthcheck 共享的 CacheService 等组件
- @ComponentScan(basePackages = {"com.energy.manage.service", "com.energy.manage.common"})
- @ForestScan(basePackages = "com.energy.manage.service.client")
- @MapperScan(value = "com.energy.manage.service.mappers", markerInterface = MyMapper.class)
- @Slf4j
- public class ManageAppApplication {
- public static void main(String[] args) {
- SpringApplication.run(ManageAppApplication.class, args);
- log.info("============= ManageService Application Service Start Success =====>");
- }
- }
|