首页>代码>dubbo项目搭建实例(自己学习做的,新生借鉴就可以)>/dubbo/provider/src/main/java/com/dubbo/provider/test/TestMain.java
package com.dubbo.provider.test; import java.io.IOException; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TestMain { public static void main(String[] args) { @SuppressWarnings("resource") ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "application.xml" }); context.start(); System.out.println("提供者服务已注册成功"); try { System.in.read();// 让此程序一直跑,表示一直提供服务 } catch (IOException e) { e.printStackTrace(); } } }