| | |
| | | |
| | | import com.java110.core.annotation.Java110ListenerDiscovery; |
| | | import com.java110.event.service.BusinessServiceDataFlowEventPublishing; |
| | | import com.java110.hardwareAdapation.thread.TranslateOwnerToMachineFactory; |
| | | import com.java110.service.init.ServiceStartInit; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * @tag |
| | | */ |
| | | @SpringBootApplication(scanBasePackages = {"com.java110.service", "com.java110.hardwareAdapation", |
| | | "com.java110.core", "com.java110.cache", "com.java110.config.properties.code","com.java110.db"}) |
| | | "com.java110.core", "com.java110.cache", "com.java110.config.properties.code", "com.java110.db"}) |
| | | @EnableDiscoveryClient |
| | | @Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class, |
| | | basePackages = {"com.java110.hardwareAdapation.listener"}) |
| | | @EnableFeignClients(basePackages = {"com.java110.core.smo.user"}) |
| | | @EnableFeignClients(basePackages = { |
| | | "com.java110.core.smo.user", |
| | | "com.java110.core.smo.order", |
| | | "com.java110.core.smo.owner", |
| | | "com.java110.core.smo.room" |
| | | }) |
| | | public class HardwareAdapationServiceApplicationStart { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(HardwareAdapationServiceApplicationStart.class); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | try{ |
| | | try { |
| | | ApplicationContext context = SpringApplication.run(HardwareAdapationServiceApplicationStart.class, args); |
| | | ServiceStartInit.initSystemConfig(context); |
| | | }catch (Throwable e){ |
| | | logger.error("系统启动失败",e); |
| | | |
| | | //启动线程 |
| | | TranslateOwnerToMachineFactory.startOwnerToMachine(); |
| | | } catch (Throwable e) { |
| | | logger.error("系统启动失败", e); |
| | | } |
| | | } |
| | | } |