All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cicada.boot.start.BootStrap Maven / Gradle / Ivy

package cicada.boot.start;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

import cicada.boot.thrift.config.UseIdService;
import cicada.core.BeanFactory;
import cicada.mq.receive.ReceiverManager;
import cicada.thrift.server.RpcServer;

@EnableAutoConfiguration()
// @EnableTransactionManagement()
@ComponentScan("cicada")
// @MapperScan("ly.im.dao")
public class BootStrap implements CommandLineRunner
{
	public static void main(String[] args)
	{
		SpringApplication.run(BootStrap.class, args);
	}

	@Override
	public void run(String... args) throws Exception
	{
//		@SuppressWarnings("resource")
//		RpcServer server = (RpcServer) BeanFactory.getBeanByType(RpcServer.class);
//		server.run(UseIdService.Iface.class);
//		System.out.println("rpc服务开始");

		ReceiverManager manager = cicada.core.BeanFactory.getBeanByType(ReceiverManager.class);
		manager.run();
		System.out.println("mq接收服务开始");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy