| | |
| | | package com.mes; |
| | | |
| | | import com.mes.common.PlcTools.S7object; |
| | | import com.mes.tools.WebSocketServer; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | //springboot 启动入口 |
| | | @SpringBootApplication |
| | | @EnableCaching |
| | | @EnableTransactionManagement//事务注解 |
| | | //@Transactional//在service里面有多表操作,开启事务注解 |
| | | @EnableTransactionManagement |
| | | public class MesApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(MesApplication.class, args); |
| | | try { |
| | | //new NettyServer(12345).start(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | SpringApplication springApplication = new SpringApplication(MesApplication.class); |
| | | ConfigurableApplicationContext applicationContext = springApplication.run(args); |
| | | WebSocketServer.setApplicationContext(applicationContext); |
| | | } |
| | | } |