Upgrade Spring Boot-based samples and integration tests to use 1.4

Closes gh-327
This commit is contained in:
Andy Wilkinson
2016-10-28 21:25:30 +01:00
parent 88d5e9192e
commit 1393182182
15 changed files with 59 additions and 96 deletions

View File

@@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE'
}
}
@@ -30,7 +30,6 @@ ext {
snippetsDir = file('build/generated-snippets')
}
ext['spring.version']='4.3.1.RELEASE'
ext['spring-restdocs.version'] = '1.2.0.BUILD-SNAPSHOT'
dependencies {
@@ -38,11 +37,11 @@ dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
testCompile('org.springframework:spring-test') {
testCompile('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'junit', module: 'junit;'
}
testCompile 'org.testng:testng:6.9.10'
testCompile 'org.springframework.restdocs:spring-restdocs-mockmvc'
testCompile 'org.testng:testng:6.9.10'
}
test {

View File

@@ -24,10 +24,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import java.lang.reflect.Method;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.restdocs.ManualRestDocumentation;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
@@ -35,8 +34,7 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@SpringApplicationConfiguration(classes=SampleTestNgApplication.class)
@WebAppConfiguration
@SpringBootTest
public class SampleTestNgApplicationTests extends AbstractTestNGSpringContextTests {
private final ManualRestDocumentation restDocumentation = new ManualRestDocumentation();