Revert "Merge branch 'master' into 2.0.x"

This reverts commit 63a1981f54, reversing
changes made to 0cca942e86.
This commit is contained in:
Marcin Grzejszczak
2017-12-20 16:31:52 +01:00
parent f69a2f63d0
commit 822dd4b732
200 changed files with 3075 additions and 1690 deletions

View File

@@ -2,8 +2,6 @@ package com.example.loan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
public class Application {
@@ -13,12 +11,3 @@ public class Application {
}
}
@RestController
class CustomController {
@GetMapping("/foo")
String foo() {
return "bar";
}
}

View File

@@ -1,4 +1,2 @@
server:
port: 0
servlet:
context-path: /my-path
server.port: 0
server.context-path: /my-path

View File

@@ -4,9 +4,9 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.cloud.contract.stubrunner.StubFinder;
import org.springframework.cloud.contract.stubrunner.spring.AutoConfigureStubRunner;
import org.springframework.test.annotation.DirtiesContext;
@@ -41,7 +41,7 @@ public class LoanApplicationServiceTests {
@Test
public void shouldStartThisAppWithContextPath() {
String response = new RestTemplate()
.getForObject("http://localhost:" + this.port + "/my-path/foo", String.class);
.getForObject("http://localhost:" + this.port + "/my-path/health", String.class);
assertThat(response).isNotEmpty();
}