mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-30 12:48:01 +08:00
Upgrade test infrastructure to more recent Spring Boot versions
This commit is contained in:
parent
9514753cc7
commit
54d104e2e2
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -145,7 +145,7 @@ class ProjectGenerationStatPublisherTests {
|
||||
request.setGroupId("com.example.acme");
|
||||
request.setArtifactId("project");
|
||||
request.setType("maven-project");
|
||||
request.setBootVersion("2.1.1.RELEASE");
|
||||
request.setBootVersion("2.4.1");
|
||||
request.setDependencies(Arrays.asList("web", "data-jpa"));
|
||||
request.setLanguage("java");
|
||||
request.getParameters().put("user-agent", "curl/1.2.4");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -61,9 +61,9 @@ class ProjectRequestDocumentFactoryTests {
|
||||
assertThat(document.getPackageName()).isEqualTo("com.example.demo");
|
||||
assertThat(document.getPackaging()).isEqualTo("jar");
|
||||
assertThat(document.getType()).isEqualTo("maven-project");
|
||||
assertThat(document.getVersion().getId()).isEqualTo("2.1.1.RELEASE");
|
||||
assertThat(document.getVersion().getId()).isEqualTo("2.4.1");
|
||||
assertThat(document.getVersion().getMajor()).isEqualTo("2");
|
||||
assertThat(document.getVersion().getMinor()).isEqualTo("2.1");
|
||||
assertThat(document.getVersion().getMinor()).isEqualTo("2.4");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -9,9 +9,9 @@
|
||||
"packaging": "jar",
|
||||
"packageName": "com.example.acme.project",
|
||||
"version": {
|
||||
"id": "2.1.1.RELEASE",
|
||||
"id": "2.4.1",
|
||||
"major": "2",
|
||||
"minor": "2.1"
|
||||
"minor": "2.4"
|
||||
},
|
||||
"client": {
|
||||
"id": "curl",
|
||||
|
@ -83,7 +83,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
}
|
||||
|
||||
private void testCurrentGenerationJar(Language language, BuildSystem build, String fileName) {
|
||||
assertThat(generateProject(language, build, "2.1.1.RELEASE")).textFile(fileName).hasSameContentAs(
|
||||
assertThat(generateProject(language, build, "2.4.1")).textFile(fileName).hasSameContentAs(
|
||||
new ClassPathResource("project/" + language + "/standard/" + getAssertFileName(fileName)));
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
}
|
||||
|
||||
private void testCurrentGenerationWar(Language language, BuildSystem build, String fileName) {
|
||||
ProjectStructure project = generateProject(language, build, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(language, build, "2.4.1", (description) -> {
|
||||
description.addDependency("web", MetadataBuildItemMapper.toDependency(WEB));
|
||||
description.setPackaging(Packaging.forId("war"));
|
||||
});
|
||||
@ -116,32 +116,32 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void nextGenerationJarJava(BuildSystem build, String fileName) {
|
||||
testNextGenerationJar(java, build, fileName);
|
||||
void previousGenerationJarJava(BuildSystem build, String fileName) {
|
||||
testPreviousGenerationJar(java, build, fileName);
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void nextGenerationJarGroovy(BuildSystem build, String fileName) {
|
||||
testNextGenerationJar(groovy, build, fileName);
|
||||
void previousGenerationJarGroovy(BuildSystem build, String fileName) {
|
||||
testPreviousGenerationJar(groovy, build, fileName);
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void nextGenerationJarKotlin(BuildSystem build, String fileName) {
|
||||
testNextGenerationJar(kotlin, build, fileName);
|
||||
void previousGenerationJarKotlin(BuildSystem build, String fileName) {
|
||||
testPreviousGenerationJar(kotlin, build, fileName);
|
||||
}
|
||||
|
||||
private void testNextGenerationJar(Language language, BuildSystem build, String fileName) {
|
||||
ProjectStructure project = generateProject(language, build, "2.2.0.RELEASE");
|
||||
private void testPreviousGenerationJar(Language language, BuildSystem build, String fileName) {
|
||||
ProjectStructure project = generateProject(language, build, "2.1.0.RELEASE");
|
||||
assertThat(project).textFile(fileName).hasSameContentAs(
|
||||
new ClassPathResource("project/" + language + "/next/" + getAssertFileName(fileName)));
|
||||
new ClassPathResource("project/" + language + "/previous/" + getAssertFileName(fileName)));
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void kotlinJava11(BuildSystem build, String fileName) {
|
||||
ProjectStructure project = generateProject(kotlin, build, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(kotlin, build, "2.4.1",
|
||||
(description) -> description.setLanguage(Language.forId(kotlin.id(), "11")));
|
||||
assertThat(project).textFile(fileName).hasSameContentAs(
|
||||
new ClassPathResource("project/" + build + "/kotlin-java11-" + getAssertFileName(fileName)));
|
||||
@ -150,7 +150,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void versionOverride(BuildSystem build, String fileName) {
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1",
|
||||
(description) -> description.addDependency("web", MetadataBuildItemMapper.toDependency(WEB)),
|
||||
(projectGenerationContext) -> projectGenerationContext.registerBean(BuildCustomizer.class,
|
||||
() -> (projectBuild) -> projectBuild.properties()
|
||||
@ -169,7 +169,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
bom.setVersionProperty("foo.version");
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().addDependencyGroup("foo", foo)
|
||||
.addBom("the-bom", bom).build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1",
|
||||
(description) -> description.addDependency("foo", MetadataBuildItemMapper.toDependency(foo)), metadata);
|
||||
assertThat(project).textFile(fileName).hasSameContentAs(
|
||||
new ClassPathResource("project/" + build + "/bom-property-" + getAssertFileName(fileName)));
|
||||
@ -183,7 +183,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
foo.setScope(Dependency.SCOPE_COMPILE_ONLY);
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults()
|
||||
.addDependencyGroup("core", "web", "data-jpa").addDependencyGroup("foo", foo).build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1", (description) -> {
|
||||
description.addDependency("foo", MetadataBuildItemMapper.toDependency(foo));
|
||||
description.addDependency("web", MetadataBuildItemMapper.toDependency(WEB));
|
||||
description.addDependency("data-jpa", MetadataBuildItemMapper.toDependency(dataJpa));
|
||||
@ -202,7 +202,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults()
|
||||
.addDependencyGroup("core", "web", "data-jpa")
|
||||
.addDependencyGroup("configuration-processor", annotationProcessor).build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1", (description) -> {
|
||||
description.addDependency("configuration-processor",
|
||||
MetadataBuildItemMapper.toDependency(annotationProcessor));
|
||||
description.addDependency("web", MetadataBuildItemMapper.toDependency(WEB));
|
||||
@ -228,7 +228,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
fooBom.getAdditionalBoms().add("biz-bom");
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().addDependencyGroup("foo", foo)
|
||||
.addBom("foo-bom", fooBom).addBom("bar-bom", barBom).addBom("biz-bom", bizBom).build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1",
|
||||
(description) -> description.addDependency("foo", MetadataBuildItemMapper.toDependency(foo)), metadata);
|
||||
assertThat(project).textFile(fileName).hasSameContentAs(
|
||||
new ClassPathResource("project/" + build + "/bom-ordering-" + getAssertFileName(fileName)));
|
||||
@ -244,7 +244,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().addDependencyGroup("test", foo, bar)
|
||||
.addRepository("foo-repository", "foo-repo", "https://example.com/foo", false)
|
||||
.addRepository("bar-repository", "bar-repo", "https://example.com/bar", true).build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1", (description) -> {
|
||||
description.addDependency("foo", MetadataBuildItemMapper.toDependency(foo));
|
||||
description.addDependency("bar", MetadataBuildItemMapper.toDependency(bar));
|
||||
}, metadata);
|
||||
@ -258,7 +258,7 @@ class BuildComplianceTests extends AbstractComplianceTests {
|
||||
Dependency foo = Dependency.withId("foo", "org.acme", "foo");
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().addDependencyGroup("test", foo)
|
||||
.build();
|
||||
ProjectStructure project = generateProject(java, build, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(java, build, "2.4.1", (description) -> {
|
||||
description.setPlatformVersion(Version.parse("2.2.0.M1"));
|
||||
description.addDependency("foo", MetadataBuildItemMapper.toDependency(foo));
|
||||
}, metadata);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -47,9 +47,9 @@ class SimpleBuildCustomizerTests {
|
||||
@Test
|
||||
void customizeVersion() {
|
||||
MutableProjectDescription description = initializeDescription();
|
||||
description.setVersion("1.5.6.RELEASE");
|
||||
description.setVersion("2.4.0");
|
||||
MavenBuild build = customizeBuild(description);
|
||||
assertThat(build.getSettings().getVersion()).isEqualTo("1.5.6.RELEASE");
|
||||
assertThat(build.getSettings().getVersion()).isEqualTo("2.4.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -53,7 +53,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationJar(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE");
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1");
|
||||
assertThat(project).filePaths().contains(
|
||||
String.format("src/main/%s/com/example/demo/DemoApplication.%s", language.id(),
|
||||
language.sourceFileExtension()),
|
||||
@ -65,7 +65,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationWar(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1",
|
||||
(description) -> description.setPackaging(Packaging.forId("war")));
|
||||
assertThat(project).filePaths().contains(
|
||||
String.format("src/main/%s/com/example/demo/DemoApplication.%s", language.id(),
|
||||
@ -78,7 +78,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationMainClass(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE");
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1");
|
||||
assertThat(project).asJvmModule(language).mainSource("com.example.demo", "DemoApplication")
|
||||
.hasSameContentAs(new ClassPathResource(
|
||||
"project/" + language + "/standard/DemoApplication." + getExpectedExtension(language)));
|
||||
@ -87,7 +87,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationTestClass(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE");
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1");
|
||||
assertThat(project).asJvmModule(language).testSource("com.example.demo", "DemoApplicationTests")
|
||||
.hasSameContentAs(new ClassPathResource(
|
||||
"project/" + language + "/standard/DemoApplicationTests." + getExpectedExtension(language)));
|
||||
@ -96,7 +96,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationTestClassWeb(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1",
|
||||
(description) -> description.addDependency("web", MetadataBuildItemMapper.toDependency(WEB)));
|
||||
assertThat(project).asJvmModule(language).testSource("com.example.demo", "DemoApplicationTests")
|
||||
.hasSameContentAs(new ClassPathResource(
|
||||
@ -106,7 +106,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationServletInitializer(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE",
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1",
|
||||
(description) -> description.setPackaging(Packaging.forId("war")));
|
||||
assertThat(project).asJvmModule(language).mainSource("com.example.demo", "ServletInitializer")
|
||||
.hasSameContentAs(new ClassPathResource(
|
||||
@ -116,7 +116,7 @@ class CodeComplianceTests extends AbstractComplianceTests {
|
||||
@ParameterizedTest
|
||||
@MethodSource("parameters")
|
||||
void currentGenerationCustomCoordinates(Language language) {
|
||||
ProjectStructure project = generateProject(language, maven, "2.1.1.RELEASE", (description) -> {
|
||||
ProjectStructure project = generateProject(language, maven, "2.4.1", (description) -> {
|
||||
description.setGroupId("com.example.acme");
|
||||
description.setArtifactId("my-project");
|
||||
description.setPackageName("com.example.acme.myproject");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -46,7 +46,7 @@ class RequestedDependenciesHelpDocumentCustomizerTests {
|
||||
this.metadataBuilder.addDependencyGroup("test", dependency);
|
||||
HelpDocument document = customizeHelp("example");
|
||||
assertThat(document.gettingStarted().isEmpty()).isFalse();
|
||||
assertSingleLink(document.gettingStarted().referenceDocs(), "https://example.com/2.1.1.RELEASE/doc",
|
||||
assertSingleLink(document.gettingStarted().referenceDocs(), "https://example.com/2.4.1/doc",
|
||||
"Reference doc example");
|
||||
}
|
||||
|
||||
@ -77,8 +77,7 @@ class RequestedDependenciesHelpDocumentCustomizerTests {
|
||||
this.metadataBuilder.addDependencyGroup("test", dependency);
|
||||
HelpDocument document = customizeHelp("example");
|
||||
assertThat(document.gettingStarted().isEmpty()).isFalse();
|
||||
assertSingleLink(document.gettingStarted().guides(), "https://example.com/2.1.1.RELEASE/how-to",
|
||||
"How-to example");
|
||||
assertSingleLink(document.gettingStarted().guides(), "https://example.com/2.4.1/how-to", "How-to example");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -108,8 +107,7 @@ class RequestedDependenciesHelpDocumentCustomizerTests {
|
||||
this.metadataBuilder.addDependencyGroup("test", dependency);
|
||||
HelpDocument document = customizeHelp("example");
|
||||
assertThat(document.gettingStarted().isEmpty()).isFalse();
|
||||
assertSingleLink(document.gettingStarted().additionalLinks(), "https://example.com/2.1.1.RELEASE/test",
|
||||
"Test App");
|
||||
assertSingleLink(document.gettingStarted().additionalLinks(), "https://example.com/2.4.1/test", "Test App");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -24,3 +24,7 @@ dependencies {
|
||||
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -24,3 +24,7 @@ dependencies {
|
||||
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -24,3 +24,7 @@ dependencyManagement {
|
||||
mavenBom 'org.acme:foo-bom:1.0'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -24,3 +24,7 @@ dependencyManagement {
|
||||
mavenBom("org.acme:foo-bom:1.0")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -26,3 +26,7 @@ dependencyManagement {
|
||||
mavenBom "org.acme:foo-bom:${fooVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -24,3 +24,7 @@ dependencyManagement {
|
||||
mavenBom("org.acme:foo-bom:${property("fooVersion")}")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -18,3 +18,7 @@ dependencies {
|
||||
compileOnly 'org.acme:foo'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -18,3 +18,7 @@ dependencies {
|
||||
compileOnly("org.acme:foo")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
|
||||
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
|
||||
@ -28,3 +28,7 @@ tasks.withType(KotlinCompile) {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
kotlin("jvm") version "1.1.1"
|
||||
kotlin("plugin.spring") version "1.1.1"
|
||||
@ -28,3 +28,7 @@ tasks.withType<KotlinCompile> {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -19,3 +19,7 @@ dependencies {
|
||||
implementation 'org.acme:foo'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -19,3 +19,7 @@ dependencies {
|
||||
implementation("org.acme:foo")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -21,3 +21,7 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -19,3 +19,7 @@ dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.0.RELEASE'
|
||||
id 'org.springframework.boot' version '2.1.0.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'groovy'
|
||||
}
|
||||
@ -15,11 +15,5 @@ repositories {
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.2.0.RELEASE"
|
||||
id("org.springframework.boot") version "2.1.0.RELEASE"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
groovy
|
||||
}
|
||||
@ -15,11 +15,5 @@ repositories {
|
||||
dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
implementation("org.codehaus.groovy:groovy")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test") {
|
||||
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
@ -32,12 +32,6 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner)
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner)
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.acme.myproject
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner)
|
||||
@SpringBootTest
|
||||
class MyProjectApplicationTests {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'groovy'
|
||||
}
|
||||
@ -17,3 +17,7 @@ dependencies {
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
groovy
|
||||
}
|
||||
@ -17,3 +17,7 @@ dependencies {
|
||||
implementation("org.codehaus.groovy:groovy")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'war'
|
||||
id 'groovy'
|
||||
@ -19,3 +19,7 @@ dependencies {
|
||||
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
war
|
||||
groovy
|
||||
@ -19,3 +19,7 @@ dependencies {
|
||||
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.0.RELEASE'
|
||||
id 'org.springframework.boot' version '2.1.0.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -14,11 +14,5 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.2.0.RELEASE"
|
||||
id("org.springframework.boot") version "2.1.0.RELEASE"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -14,11 +14,5 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test") {
|
||||
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
@ -28,12 +28,6 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,16 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,16 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,16 +1,13 @@
|
||||
package com.example.acme.myproject;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class MyProjectApplicationTests {
|
||||
class MyProjectApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
@ -16,3 +16,7 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
}
|
||||
@ -16,3 +16,7 @@ dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'java'
|
||||
id 'war'
|
||||
@ -18,3 +18,7 @@ dependencies {
|
||||
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
java
|
||||
war
|
||||
@ -18,3 +18,7 @@ dependencies {
|
||||
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.0.RELEASE'
|
||||
id 'org.springframework.boot' version '2.1.0.RELEASE'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
|
||||
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
|
||||
@ -19,9 +19,7 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-reflect'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
tasks.withType(KotlinCompile) {
|
||||
@ -30,7 +28,3 @@ tasks.withType(KotlinCompile) {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.2.0.RELEASE"
|
||||
id("org.springframework.boot") version "2.1.0.RELEASE"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
kotlin("jvm") version "1.1.1"
|
||||
kotlin("plugin.spring") version "1.1.1"
|
||||
@ -19,13 +19,7 @@ dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test") {
|
||||
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
@ -37,12 +37,6 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner::class)
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner::class)
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.example.acme.myproject
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.test.context.junit4.SpringRunner
|
||||
|
||||
@RunWith(SpringRunner::class)
|
||||
@SpringBootTest
|
||||
class MyProjectApplicationTests {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
|
||||
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
|
||||
@ -28,3 +28,7 @@ tasks.withType(KotlinCompile) {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
kotlin("jvm") version "1.1.1"
|
||||
kotlin("plugin.spring") version "1.1.1"
|
||||
@ -28,3 +28,7 @@ tasks.withType<KotlinCompile> {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.1.1.RELEASE'
|
||||
id 'org.springframework.boot' version '2.4.1'
|
||||
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
||||
id 'war'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
|
||||
@ -30,3 +30,7 @@ tasks.withType(KotlinCompile) {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot") version "2.1.1.RELEASE"
|
||||
id("org.springframework.boot") version "2.4.1"
|
||||
id("io.spring.dependency-management") version "1.0.6.RELEASE"
|
||||
war
|
||||
kotlin("jvm") version "1.1.1"
|
||||
@ -30,3 +30,7 @@ tasks.withType<KotlinCompile> {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
|
@ -162,8 +162,8 @@ public class InitializrMetadataTestBuilder {
|
||||
}
|
||||
|
||||
public InitializrMetadataTestBuilder addDefaultBootVersions() {
|
||||
return addBootVersion("1.5.17.RELEASE", false).addBootVersion("2.0.3.RELEASE", false)
|
||||
.addBootVersion("2.1.1.RELEASE", true).addBootVersion("2.2.0.BUILD-SNAPSHOT", false);
|
||||
return addBootVersion("2.2.17.RELEASE", false).addBootVersion("2.3.3.RELEASE", false)
|
||||
.addBootVersion("2.4.1", true).addBootVersion("2.5.0-SNAPSHOT", false);
|
||||
}
|
||||
|
||||
public InitializrMetadataTestBuilder addBootVersion(String id, boolean defaultValue) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -101,7 +101,7 @@ class InitializrMetadataBuilderTests {
|
||||
assertThat(myBom).isNotNull();
|
||||
assertThat(myBom.getGroupId()).isEqualTo("org.acme");
|
||||
assertThat(myBom.getArtifactId()).isEqualTo("my-bom");
|
||||
assertThat(myBom.getVersion()).isEqualTo("2.1.1.RELEASE");
|
||||
assertThat(myBom.getVersion()).isEqualTo("2.4.1");
|
||||
|
||||
BillOfMaterials anotherBom = boms.get("another-bom");
|
||||
assertThat(anotherBom).isNotNull();
|
||||
|
@ -85,12 +85,12 @@ initializr:
|
||||
artifactId: biz
|
||||
scope: runtime
|
||||
version: 1.3.5
|
||||
compatibilityRange: 2.2.0.BUILD-SNAPSHOT
|
||||
compatibilityRange: 2.5.0-SNAPSHOT
|
||||
- name: Bur
|
||||
id: org.acme:bur
|
||||
version: 2.1.0
|
||||
scope: test
|
||||
compatibilityRange: "[2.1.4.RELEASE,2.2.0.BUILD-SNAPSHOT)"
|
||||
compatibilityRange: "[2.1.4.RELEASE,2.5.0-SNAPSHOT)"
|
||||
- name: My API
|
||||
id : my-api
|
||||
groupId: org.acme
|
||||
@ -152,12 +152,12 @@ initializr:
|
||||
default: false
|
||||
bootVersions:
|
||||
- name : Latest SNAPSHOT
|
||||
id: 2.2.0.BUILD-SNAPSHOT
|
||||
id: 2.5.0-SNAPSHOT
|
||||
default: false
|
||||
- name: 2.1.4
|
||||
id: 2.1.4.RELEASE
|
||||
default: true
|
||||
- name: 1.5.17
|
||||
id: 1.5.17.RELEASE
|
||||
id: 2.2.17.RELEASE
|
||||
default: false
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
"my-bom": {
|
||||
"groupId": "org.acme",
|
||||
"artifactId": "my-bom",
|
||||
"version": "2.1.1.RELEASE"
|
||||
"version": "2.4.1"
|
||||
},
|
||||
"another-bom": {
|
||||
"groupId": "org.acme",
|
||||
|
@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"name": "1.5.17",
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -64,7 +64,7 @@ class MavenResolverDependencyManagementVersionResolverTests {
|
||||
@Test
|
||||
void snapshotBomCanBeResolved() {
|
||||
Map<String, String> versions = this.resolver.resolve("org.springframework.boot", "spring-boot-dependencies",
|
||||
"2.2.0.BUILD-SNAPSHOT");
|
||||
"2.4.0-SNAPSHOT");
|
||||
assertThat(versions).isNotEmpty();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -85,7 +85,7 @@ class ProjectGenerationControllerIntegrationTests extends AbstractInitializrCont
|
||||
@Test
|
||||
void dependencyInRange() {
|
||||
Dependency biz = Dependency.create("org.acme", "biz", "1.3.5", "runtime");
|
||||
ProjectStructure project = downloadTgz("/starter.tgz?dependencies=org.acme:biz&bootVersion=2.2.1.RELEASE");
|
||||
ProjectStructure project = downloadTgz("/starter.tgz?dependencies=org.acme:biz&bootVersion=2.5.1");
|
||||
assertDefaultProject(project);
|
||||
assertDoesNotHaveWebResources(project);
|
||||
assertThat(project).mavenBuild().hasDependenciesSize(3).hasDependency(biz);
|
||||
|
@ -111,11 +111,11 @@ class ProjectMetadataControllerCustomDefaultsIntegrationTests extends AbstractFu
|
||||
|
||||
@Test
|
||||
void filteredDependencies() throws JSONException {
|
||||
ResponseEntity<String> response = execute("/dependencies?bootVersion=2.4.1.RELEASE", String.class, null,
|
||||
ResponseEntity<String> response = execute("/dependencies?bootVersion=2.5.1", String.class, null,
|
||||
"application/json");
|
||||
assertThat(response.getHeaders().getFirst(HttpHeaders.ETAG)).isNotNull();
|
||||
validateContentType(response, DEFAULT_METADATA_MEDIA_TYPE);
|
||||
validateDependenciesOutput("2.4.1", response.getBody());
|
||||
validateDependenciesOutput("2.5.1", response.getBody());
|
||||
}
|
||||
|
||||
protected void validateDependenciesOutput(String version, String actual) throws JSONException {
|
||||
|
@ -75,12 +75,12 @@ public class ProjectMetadataControllerIntegrationTests extends AbstractInitializ
|
||||
@Test
|
||||
void metadataWithInvalidPlatformVersion() {
|
||||
try {
|
||||
execute("/dependencies?bootVersion=1.5.17.RELEASE", String.class, "application/vnd.initializr.v2.1+json",
|
||||
execute("/dependencies?bootVersion=2.2.17.RELEASE", String.class, "application/vnd.initializr.v2.1+json",
|
||||
"application/json");
|
||||
}
|
||||
catch (HttpClientErrorException ex) {
|
||||
assertThat(ex.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
|
||||
assertThat(ex.getResponseBodyAsString().contains("1.5.17.RELEASE"));
|
||||
assertThat(ex.getResponseBodyAsString().contains("2.2.17.RELEASE"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,14 +131,14 @@ class DefaultProjectRequestToDescriptionConverterTests {
|
||||
@Test
|
||||
void convertWhenDependencyOutOfRangeShouldThrowException() {
|
||||
Dependency dependency = Dependency.withId("foo");
|
||||
dependency.setRange(new VersionRange(Version.parse("2.2.0.M1")));
|
||||
dependency.setRange(new VersionRange(Version.parse("2.5.0.M1")));
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().addDependencyGroup("foo", dependency)
|
||||
.build();
|
||||
ProjectRequest request = createProjectRequest();
|
||||
request.setDependencies(Collections.singletonList("foo"));
|
||||
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
||||
.isThrownBy(() -> this.converter.convert(request, metadata))
|
||||
.withMessage("Dependency 'foo' is not compatible " + "with Spring Boot 2.1.1.RELEASE");
|
||||
.withMessage("Dependency 'foo' is not compatible " + "with Spring Boot 2.4.1");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
class MetadataProjectDescriptionCustomizerTests {
|
||||
|
||||
private InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().build();
|
||||
private final InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().build();
|
||||
|
||||
@Test
|
||||
void customizeShouldUseDefaultApplicationNameFromMetadata() {
|
||||
@ -47,8 +47,7 @@ class MetadataProjectDescriptionCustomizerTests {
|
||||
|
||||
@Test
|
||||
void customizeShouldUseDefaultPlatformVersionFromMetadata() {
|
||||
assertThat(customize(new MutableProjectDescription()).getPlatformVersion())
|
||||
.isEqualTo(Version.parse("2.1.1.RELEASE"));
|
||||
assertThat(customize(new MutableProjectDescription()).getPlatformVersion()).isEqualTo(Version.parse("2.4.1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -85,7 +85,7 @@ initializr:
|
||||
artifactId: biz
|
||||
scope: runtime
|
||||
version: 1.3.5
|
||||
compatibilityRange: 2.2.0.BUILD-SNAPSHOT
|
||||
compatibilityRange: 2.5.0-SNAPSHOT
|
||||
- name: Bur
|
||||
id: org.acme:bur
|
||||
version: 2.1.0
|
||||
@ -158,7 +158,7 @@ initializr:
|
||||
id: 2.1.4.RELEASE
|
||||
default: true
|
||||
- name: 1.5.17
|
||||
id: 1.5.17.RELEASE
|
||||
id: 2.2.17.RELEASE
|
||||
default: false
|
||||
|
||||
server:
|
||||
|
@ -20,7 +20,7 @@
|
||||
},
|
||||
{
|
||||
"default": false,
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
],
|
||||
@ -224,7 +224,7 @@
|
||||
"name": "Biz",
|
||||
"scope": "runtime",
|
||||
"version": "1.3.5",
|
||||
"compatibilityRange": "2.2.0.BUILD-SNAPSHOT"
|
||||
"compatibilityRange": "2.5.0-SNAPSHOT"
|
||||
},
|
||||
{
|
||||
"starter": true,
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"bootVersion": "2.4.1.RELEASE",
|
||||
"bootVersion": "2.5.1",
|
||||
"repositories": {
|
||||
"my-api-repo-2": {
|
||||
"name": "repo2",
|
@ -162,7 +162,7 @@
|
||||
"name": "2.1.4"
|
||||
},
|
||||
{
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
]
|
||||
|
@ -162,7 +162,7 @@
|
||||
"name": "2.1.4"
|
||||
},
|
||||
{
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
]
|
||||
|
@ -80,7 +80,7 @@
|
||||
{
|
||||
"id": "org.acme:biz",
|
||||
"name": "Biz",
|
||||
"versionRange": "2.2.0.BUILD-SNAPSHOT"
|
||||
"versionRange": "2.5.0.BUILD-SNAPSHOT"
|
||||
},
|
||||
{
|
||||
"id": "org.acme:bur",
|
||||
@ -200,7 +200,7 @@
|
||||
"name": "2.1.4"
|
||||
},
|
||||
{
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
]
|
||||
|
@ -80,7 +80,7 @@
|
||||
{
|
||||
"id": "org.acme:biz",
|
||||
"name": "Biz",
|
||||
"versionRange": "2.2.0.BUILD-SNAPSHOT"
|
||||
"versionRange": "2.5.0.BUILD-SNAPSHOT"
|
||||
},
|
||||
{
|
||||
"id": "org.acme:bur",
|
||||
@ -200,7 +200,7 @@
|
||||
"name": "2.1.4"
|
||||
},
|
||||
{
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
]
|
||||
|
@ -80,7 +80,7 @@
|
||||
{
|
||||
"id": "org.acme:biz",
|
||||
"name": "Biz",
|
||||
"versionRange": "2.2.0.BUILD-SNAPSHOT"
|
||||
"versionRange": "2.5.0-SNAPSHOT"
|
||||
},
|
||||
{
|
||||
"id": "org.acme:bur",
|
||||
@ -200,7 +200,7 @@
|
||||
"name": "2.1.4"
|
||||
},
|
||||
{
|
||||
"id": "1.5.17.RELEASE",
|
||||
"id": "2.2.17.RELEASE",
|
||||
"name": "1.5.17"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user