資源簡介
dubbo+zookeeper入門資源,可直接使用,適合新手練習使用。博文地址:http://blog.csdn.net/sysmwx/article/details/78870386
代碼片段和文件信息
package?com.test;
import?java.io.IOException;
import?org.springframework.context.support.ClassPathxmlApplicationContext;
import?com.test.service.TestService;
public?class?TestMain?{
public?static?void?main(String[]?args)?{
ClassPathxmlApplicationContext?context?=?new?ClassPathxmlApplicationContext(“applicationContext.xml“);
????????context.start();
????????TestService?testService?=?(TestService)?context.getBean(“testService“);
????????System.out.println(testService.getStr());
????????try?{
????????????System.in.read();
????????}?catch?(IOException?e)?{???????
????????????e.printStackTrace();
????????}?
}
}
評論
共有 條評論