diff --git a/spring-boot-samples/pom.xml b/spring-boot-samples/pom.xml index 627d535af1..45bb5938da 100644 --- a/spring-boot-samples/pom.xml +++ b/spring-boot-samples/pom.xml @@ -58,7 +58,7 @@ spring-boot-sample-websocket spring-boot-sample-ws spring-boot-sample-xml - + diff --git a/spring-boot-samples/spring-boot-sample-ws/README.adoc b/spring-boot-samples/spring-boot-sample-ws/README.adoc index 051ac85e15..9fab87f6b0 100644 --- a/spring-boot-samples/spring-boot-sample-ws/README.adoc +++ b/spring-boot-samples/spring-boot-sample-ws/README.adoc @@ -1,9 +1,9 @@ == Spring Boot - Samples - Web Services This sample project demonstrates how to use http://projects.spring.io/spring-ws/[Spring Web Services] -with Spring Boot. It is an implementation of the +with Spring Boot. It is an implementation of the http://docs.spring.io/spring-ws/site/reference/html/tutorial.html#tutorial.implementing.endpoint[Holiday Request sample] -in the Spring Web Services reference guilde. +in the Spring Web Services reference guide. The sample uses Maven. It can be built and run from the command line: @@ -11,4 +11,4 @@ The sample uses Maven. It can be built and run from the command line: $ mvn spring-boot:run ---- -http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL. \ No newline at end of file +http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL. diff --git a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java index 35f5056084..3881d4ccd0 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package sample.ws; import org.springframework.boot.SpringApplication; @@ -28,4 +29,5 @@ public class SampleWsApplication { public static void main(String[] args) throws Exception { SpringApplication.run(SampleWsApplication.class, args); } + } diff --git a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java index b6ac0a6f08..c74c2e916d 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package sample.ws; import org.springframework.boot.context.embedded.ServletRegistrationBean; @@ -52,4 +53,5 @@ public class WebServiceConfig extends WsConfigurerAdapter { public XsdSchema countriesSchema() { return new SimpleXsdSchema(new ClassPathResource("META-INF/schemas/hr.xsd")); } + } diff --git a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java index db86e0dd2e..a7b7634ff4 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package sample.ws.endpoint; import java.text.SimpleDateFormat; @@ -76,4 +77,5 @@ public class HolidayEndpoint { this.humanResourceService.bookHoliday(startDate, endDate, name); } + } diff --git a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java index 4289d70cda..6d0f819674 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package sample.ws.service; import java.util.Date; @@ -20,4 +21,5 @@ import java.util.Date; public interface HumanResourceService { void bookHoliday(Date startDate, Date endDate, String name); + } diff --git a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java index 5d3fdc071c..1974934861 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package sample.ws.service; import java.util.Date; @@ -31,4 +32,5 @@ public class StubHumanResourceService implements HumanResourceService { this.logger.info("Booking holiday for [{} - {}] for [{}] ", startDate, endDate, name); } + } diff --git a/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java b/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java index 055db790e1..e05a17ed99 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java @@ -21,21 +21,29 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.IntegrationTest; +import org.springframework.boot.test.OutputCapture; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.ws.client.core.WebServiceTemplate; +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertThat; + @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SampleWsApplication.class) @WebAppConfiguration @IntegrationTest public class SampleWsApplicationTests { + @Rule + public OutputCapture output = new OutputCapture(); + private WebServiceTemplate webServiceTemplate = new WebServiceTemplate(); @Value("${local.server.port}") @@ -65,5 +73,7 @@ public class SampleWsApplicationTests { StreamResult result = new StreamResult(System.out); this.webServiceTemplate.sendSourceAndReceiveToResult(source, result); + assertThat(this.output.toString(), containsString("Booking holiday for")); } -} \ No newline at end of file + +} diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml index d33244f464..7361838bec 100644 --- a/spring-boot-starters/pom.xml +++ b/spring-boot-starters/pom.xml @@ -54,7 +54,7 @@ spring-boot-starter-velocity spring-boot-starter-web spring-boot-starter-websocket - spring-boot-starter-ws + spring-boot-starter-ws diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java index e286ec14e5..e10271dee9 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java @@ -27,7 +27,7 @@ import org.springframework.util.ReflectionUtils; /** * Utility used to run a process. - * + * * @author Phillip Webb * @author Dave Syer * @author Andy Wilkinson