- package cn.hhj.config;
- import cn.hhj.server.RpcServer;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.Configuration;
- @Configuration
- @ComponentScan(basePackages = "cn.hhj.service")
- public class SpringConfig {
- @Bean(name="rpcService")
- public RpcServer gpRpcServer(){
- return new RpcServer();
- }
- }
|