完成springboot-hibernate升级
This commit is contained in:
@ -46,6 +46,10 @@ com.xncoding.webservice.client.User user = c.getCommonServiceImplPort().getUser(
|
||||
assertThat(user.getName(), is("Tom"));
|
||||
```
|
||||
|
||||
## 测试步骤
|
||||
|
||||
先启动springboot项目,然后执行`com.xncoding.webservice.ApplicationTests`单元测试类。
|
||||
|
||||
## 许可证
|
||||
|
||||
Copyright (c) 2018 Xiong Neng
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.xncoding.webservice;
|
||||
|
||||
import com.xncoding.webservice.client.CommonService_Service;
|
||||
import com.xncoding.webservice.model.User;
|
||||
import com.xncoding.webservice.service.ICommonService;
|
||||
import org.apache.cxf.endpoint.Client;
|
||||
@ -8,18 +7,9 @@ import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
|
||||
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ApplicationTests {
|
||||
@LocalServerPort
|
||||
|
||||
private Integer port;
|
||||
/**
|
||||
* 接口地址
|
||||
@ -28,7 +18,7 @@ public class ApplicationTests {
|
||||
|
||||
@Before
|
||||
public void prepare() {
|
||||
wsdlAddress = "http://localhost:" + port + "/services/CommonService?wsdl";
|
||||
wsdlAddress = "http://localhost:8092/services/CommonService?wsdl";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user