SpringConfig.java 427 B

12345678910111213141516
  1. package cn.hhj.config;
  2. import cn.hhj.server.RpcServer;
  3. import org.springframework.context.annotation.Bean;
  4. import org.springframework.context.annotation.ComponentScan;
  5. import org.springframework.context.annotation.Configuration;
  6. @Configuration
  7. @ComponentScan(basePackages = "cn.hhj.service")
  8. public class SpringConfig {
  9. @Bean(name="rpcService")
  10. public RpcServer gpRpcServer(){
  11. return new RpcServer();
  12. }
  13. }