package com.hxh.spring.test.dubbo;
|
|
import com.ks.goldcorn.pojo.DO.GoldCornAppInfo;
|
import com.ks.goldcorn.service.remote.GoldCornAppService;
|
import org.apache.dubbo.config.annotation.Reference;
|
import org.junit.Test;
|
import org.junit.runner.RunWith;
|
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.web.WebAppConfiguration;
|
|
@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试
|
@ContextConfiguration(locations = {"classpath:spring.xml"})
|
@WebAppConfiguration
|
public class GoldCornTest {
|
|
|
@Reference(version = "1.0")
|
private GoldCornAppService goldCornAppService;
|
|
@Test
|
public void getApp() {
|
GoldCornAppInfo app = goldCornAppService.selectByCode("buwan");
|
System.out.println(app);
|
}
|
|
|
}
|