mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-19 01:58:16 +08:00
Simplify project generation version checks
This commit simplifies project generation by only checking for supported Spring Boot version (i.e. 1.5 and later) and therefore removing any logic that is specified to a non supported version. Concretely, initializr is no longer able to generate a project for a Spring Boot version prior to 1.5 Closes gh-763
This commit is contained in:
@@ -64,21 +64,7 @@ public class ProjectGenerator {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ProjectGenerator.class);
|
||||
|
||||
private static final Version VERSION_1_2_0_RC1 = Version.parse("1.2.0.RC1");
|
||||
|
||||
private static final Version VERSION_1_3_0_M1 = Version.parse("1.3.0.M1");
|
||||
|
||||
private static final Version VERSION_1_4_0_M2 = Version.parse("1.4.0.M2");
|
||||
|
||||
private static final Version VERSION_1_4_0_M3 = Version.parse("1.4.0.M3");
|
||||
|
||||
private static final Version VERSION_1_4_2_M1 = Version.parse("1.4.2.M1");
|
||||
|
||||
private static final Version VERSION_2_0_0_M1 = Version.parse("2.0.0.M1");
|
||||
|
||||
private static final Version VERSION_2_0_0_M3 = Version.parse("2.0.0.M3");
|
||||
|
||||
private static final Version VERSION_2_0_0_M6 = Version.parse("2.0.0.M6");
|
||||
private static final Version VERSION_2_0_0 = Version.parse("2.0.0.RELEASE");
|
||||
|
||||
@Autowired
|
||||
private ApplicationEventPublisher eventPublisher;
|
||||
@@ -365,8 +351,8 @@ public class ProjectGenerator {
|
||||
model.put("war", true);
|
||||
}
|
||||
|
||||
// Kotlin supported as of M6
|
||||
final boolean kotlinSupport = VERSION_2_0_0_M6.compareTo(bootVersion) <= 0;
|
||||
// Kotlin supported as of 2.0
|
||||
final boolean kotlinSupport = VERSION_2_0_0.compareTo(bootVersion) <= 0;
|
||||
model.put("kotlinSupport", kotlinSupport);
|
||||
|
||||
if (isMavenBuild(request)) {
|
||||
@@ -443,25 +429,15 @@ public class ProjectGenerator {
|
||||
model.put("isRelease", request.getBootVersion().contains("RELEASE"));
|
||||
setupApplicationModel(request, model);
|
||||
|
||||
// Gradle plugin has changed as from 1.3.0
|
||||
model.put("bootOneThreeAvailable", VERSION_1_3_0_M1.compareTo(bootVersion) <= 0);
|
||||
|
||||
final boolean bootTwoZeroAvailable = VERSION_2_0_0_M1.compareTo(bootVersion) <= 0;
|
||||
final boolean bootTwoZeroAvailable = VERSION_2_0_0.compareTo(bootVersion) <= 0;
|
||||
model.put("bootTwoZeroAvailable", bootTwoZeroAvailable);
|
||||
|
||||
// Gradle plugin has changed again as from 1.4.2
|
||||
model.put("springBootPluginName", (VERSION_1_4_2_M1.compareTo(bootVersion) <= 0)
|
||||
? "org.springframework.boot" : "spring-boot");
|
||||
|
||||
// New testing stuff
|
||||
model.put("newTestInfrastructure", isNewTestInfrastructureAvailable(request));
|
||||
|
||||
// Servlet Initializer
|
||||
model.put("servletInitializrImport", new Imports(request.getLanguage())
|
||||
.add(getServletInitializrClass(request)).toString());
|
||||
|
||||
// Kotlin-specific dep
|
||||
model.put("kotlinStdlibArtifactId", getKotlinStdlibArtifactId(request));
|
||||
model.put("kotlinStdlibArtifactId", "kotlin-stdlib-jdk8");
|
||||
|
||||
// Java versions
|
||||
model.put("java8OrLater", isJava8OrLater(request));
|
||||
@@ -513,19 +489,8 @@ public class ProjectGenerator {
|
||||
Map<String, Object> model) {
|
||||
Imports imports = new Imports(request.getLanguage());
|
||||
Annotations annotations = new Annotations();
|
||||
boolean useSpringBootApplication = VERSION_1_2_0_RC1
|
||||
.compareTo(Version.safeParse(request.getBootVersion())) <= 0;
|
||||
if (useSpringBootApplication) {
|
||||
imports.add("org.springframework.boot.autoconfigure.SpringBootApplication");
|
||||
annotations.add("@SpringBootApplication");
|
||||
}
|
||||
else {
|
||||
imports.add("org.springframework.boot.autoconfigure.EnableAutoConfiguration")
|
||||
.add("org.springframework.context.annotation.ComponentScan")
|
||||
.add("org.springframework.context.annotation.Configuration");
|
||||
annotations.add("@EnableAutoConfiguration").add("@ComponentScan")
|
||||
.add("@Configuration");
|
||||
}
|
||||
imports.add("org.springframework.boot.autoconfigure.SpringBootApplication");
|
||||
annotations.add("@SpringBootApplication");
|
||||
model.put("applicationImports", imports.toString());
|
||||
model.put("applicationAnnotations", annotations.toString());
|
||||
|
||||
@@ -534,19 +499,8 @@ public class ProjectGenerator {
|
||||
protected void setupTestModel(ProjectRequest request, Map<String, Object> model) {
|
||||
Imports imports = new Imports(request.getLanguage());
|
||||
Annotations testAnnotations = new Annotations();
|
||||
boolean newTestInfrastructure = isNewTestInfrastructureAvailable(request);
|
||||
if (newTestInfrastructure) {
|
||||
imports.add("org.springframework.boot.test.context.SpringBootTest")
|
||||
.add("org.springframework.test.context.junit4.SpringRunner");
|
||||
}
|
||||
else {
|
||||
imports.add("org.springframework.boot.test.SpringApplicationConfiguration")
|
||||
.add("org.springframework.test.context.junit4.SpringJUnit4ClassRunner");
|
||||
}
|
||||
if (request.hasWebFacet() && !newTestInfrastructure) {
|
||||
imports.add("org.springframework.test.context.web.WebAppConfiguration");
|
||||
testAnnotations.add("@WebAppConfiguration");
|
||||
}
|
||||
imports.add("org.springframework.boot.test.context.SpringBootTest")
|
||||
.add("org.springframework.test.context.junit4.SpringRunner");
|
||||
model.put("testImports", imports.withFinalCarriageReturn().toString());
|
||||
model.put("testAnnotations",
|
||||
testAnnotations.withFinalCarriageReturn().toString());
|
||||
@@ -554,26 +508,10 @@ public class ProjectGenerator {
|
||||
|
||||
protected String getServletInitializrClass(ProjectRequest request) {
|
||||
Version bootVersion = Version.safeParse(request.getBootVersion());
|
||||
if (VERSION_1_4_0_M3.compareTo(bootVersion) > 0) {
|
||||
return "org.springframework.boot.context.web.SpringBootServletInitializer";
|
||||
}
|
||||
else if (VERSION_2_0_0_M1.compareTo(bootVersion) > 0) {
|
||||
if (VERSION_2_0_0.compareTo(bootVersion) > 0) {
|
||||
return "org.springframework.boot.web.support.SpringBootServletInitializer";
|
||||
}
|
||||
else {
|
||||
return "org.springframework.boot.web.servlet.support.SpringBootServletInitializer";
|
||||
}
|
||||
}
|
||||
|
||||
protected String getKotlinStdlibArtifactId(ProjectRequest request) {
|
||||
String javaVersion = request.getJavaVersion();
|
||||
if ("1.6".equals(javaVersion)) {
|
||||
return "kotlin-stdlib";
|
||||
}
|
||||
else if ("1.7".equals(javaVersion)) {
|
||||
return "kotlin-stdlib-jdk7";
|
||||
}
|
||||
return "kotlin-stdlib-jdk8";
|
||||
return "org.springframework.boot.web.servlet.support.SpringBootServletInitializer";
|
||||
}
|
||||
|
||||
private static boolean isJava8OrLater(ProjectRequest request) {
|
||||
@@ -593,13 +531,8 @@ public class ProjectGenerator {
|
||||
return "war".equals(request.getPackaging());
|
||||
}
|
||||
|
||||
private static boolean isNewTestInfrastructureAvailable(ProjectRequest request) {
|
||||
return VERSION_1_4_0_M2
|
||||
.compareTo(Version.safeParse(request.getBootVersion())) <= 0;
|
||||
}
|
||||
|
||||
private static boolean isGradle4Available(Version bootVersion) {
|
||||
return VERSION_2_0_0_M3.compareTo(bootVersion) < 0;
|
||||
return VERSION_2_0_0.compareTo(bootVersion) <= 0;
|
||||
}
|
||||
|
||||
private byte[] doGenerateMavenPom(Map<String, Object> model) {
|
||||
|
@@ -3,14 +3,8 @@ package {{packageName}}
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
{{testImports}}
|
||||
{{#newTestInfrastructure}}
|
||||
@RunWith(SpringRunner)
|
||||
@SpringBootTest
|
||||
{{/newTestInfrastructure}}
|
||||
{{^newTestInfrastructure}}
|
||||
@RunWith(SpringJUnit4ClassRunner)
|
||||
@SpringApplicationConfiguration(classes = {{applicationName}})
|
||||
{{/newTestInfrastructure}}
|
||||
{{testAnnotations}}class {{applicationName}}Tests {
|
||||
|
||||
@Test
|
||||
|
@@ -3,14 +3,8 @@ package {{packageName}};
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
{{testImports}}
|
||||
{{#newTestInfrastructure}}
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
{{/newTestInfrastructure}}
|
||||
{{^newTestInfrastructure}}
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = {{applicationName}}.class)
|
||||
{{/newTestInfrastructure}}
|
||||
{{testAnnotations}}public class {{applicationName}}Tests {
|
||||
|
||||
@Test
|
||||
|
@@ -3,14 +3,8 @@ package {{packageName}}
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
{{testImports}}
|
||||
{{#newTestInfrastructure}}
|
||||
@RunWith(SpringRunner::class)
|
||||
@SpringBootTest
|
||||
{{/newTestInfrastructure}}
|
||||
{{^newTestInfrastructure}}
|
||||
@RunWith(SpringJUnit4ClassRunner::class)
|
||||
@SpringApplicationConfiguration(classes = arrayOf({{applicationName}}::class))
|
||||
{{/newTestInfrastructure}}
|
||||
{{testAnnotations}}class {{applicationName}}Tests {
|
||||
|
||||
@Test
|
||||
|
@@ -13,9 +13,6 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
||||
{{^bootOneThreeAvailable}}
|
||||
classpath('io.spring.gradle:dependency-management-plugin:{{dependencyManagementPluginVersion}}')
|
||||
{{/bootOneThreeAvailable}}
|
||||
{{#kotlin}}
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
|
||||
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
|
||||
@@ -39,10 +36,7 @@ apply plugin: 'eclipse-wtp'
|
||||
{{^war}}
|
||||
apply plugin: 'eclipse'
|
||||
{{/war}}
|
||||
apply plugin: '{{springBootPluginName}}'
|
||||
{{^bootOneThreeAvailable}}
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
{{/bootOneThreeAvailable}}
|
||||
apply plugin: 'org.springframework.boot'
|
||||
{{#bootTwoZeroAvailable}}
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
{{/bootTwoZeroAvailable}}
|
||||
|
@@ -28,10 +28,7 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -98,9 +95,9 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
@Test
|
||||
public void mavenPomWithBootSnapshot() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.0.1.BUILD-SNAPSHOT");
|
||||
request.setBootVersion("2.1.1.BUILD-SNAPSHOT");
|
||||
generateMavenPom(request).hasSnapshotRepository()
|
||||
.hasSpringBootParent("1.0.1.BUILD-SNAPSHOT")
|
||||
.hasSpringBootParent("2.1.1.BUILD-SNAPSHOT")
|
||||
.hasSpringBootStarterDependency("web");
|
||||
}
|
||||
|
||||
@@ -284,92 +281,33 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
verifyProjectSuccessfulEventFor(request);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot11UseEnableAutoConfigurationJava() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.1.9.RELEASE");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/java/foo/MyDemoApplication.java")
|
||||
.hasImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.doesNotHaveImports(SpringBootApplication.class.getName())
|
||||
.contains("@EnableAutoConfiguration", "@Configuration", "@ComponentScan")
|
||||
.doesNotContain("@SpringBootApplication");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBootUseSpringBootApplicationJava() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.2.0.RC1");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/java/foo/MyDemoApplication.java")
|
||||
.hasImports(SpringBootApplication.class.getName())
|
||||
.doesNotHaveImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.contains("@SpringBootApplication").doesNotContain(
|
||||
"@EnableAutoConfiguration", "@Configuration", "@ComponentScan");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot11UseEnableAutoConfigurationGroovy() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setLanguage("groovy");
|
||||
request.setBootVersion("1.1.9.RELEASE");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/groovy/foo/MyDemoApplication.groovy")
|
||||
.hasImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.doesNotHaveImports(SpringBootApplication.class.getName())
|
||||
.contains("@EnableAutoConfiguration", "@Configuration", "@ComponentScan")
|
||||
.doesNotContain("@SpringBootApplication");
|
||||
.contains("@SpringBootApplication");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBootUseSpringBootApplicationGroovy() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setLanguage("groovy");
|
||||
request.setBootVersion("1.2.0.RC1");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/groovy/foo/MyDemoApplication.groovy")
|
||||
.hasImports(SpringBootApplication.class.getName())
|
||||
.doesNotHaveImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.contains("@SpringBootApplication").doesNotContain(
|
||||
"@EnableAutoConfiguration", "@Configuration", "@ComponentScan");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot11UseEnableAutoConfigurationKotlin() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setLanguage("kotlin");
|
||||
request.setBootVersion("1.1.9.RELEASE");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
|
||||
applyMetadata(initializeTestMetadataBuilder().addDependencyGroup("core", "web")
|
||||
.setKotlinEnv("1.0.0").build());
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/kotlin/foo/MyDemoApplication.kt")
|
||||
.hasImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.doesNotHaveImports(SpringBootApplication.class.getName())
|
||||
.contains("@EnableAutoConfiguration", "@Configuration", "@ComponentScan")
|
||||
.doesNotContain("@SpringBootApplication");
|
||||
.contains("@SpringBootApplication");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBootUseSpringBootApplicationKotlin() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setLanguage("kotlin");
|
||||
request.setBootVersion("1.2.0.RC1");
|
||||
request.setName("MyDemo");
|
||||
request.setPackageName("foo");
|
||||
|
||||
@@ -378,10 +316,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
generateProject(request)
|
||||
.sourceCodeAssert("src/main/kotlin/foo/MyDemoApplication.kt")
|
||||
.hasImports(SpringBootApplication.class.getName())
|
||||
.doesNotHaveImports(EnableAutoConfiguration.class.getName(),
|
||||
ComponentScan.class.getName(), Configuration.class.getName())
|
||||
.contains("@SpringBootApplication").doesNotContain(
|
||||
"@EnableAutoConfiguration", "@Configuration", "@ComponentScan");
|
||||
.contains("@SpringBootApplication");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -393,26 +328,10 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot20M3UseGradle3() {
|
||||
public void springBoot20UsesGradle4() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setType("gradle-project");
|
||||
request.setBootVersion("2.0.0.M3");
|
||||
generateProject(request).isGradleProject("3.5.1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot20M4UsesGradle4() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setType("gradle-project");
|
||||
request.setBootVersion("2.0.0.M4");
|
||||
generateProject(request).isGradleProject("4.10.2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void springBoot20SnapshotsUseGradle4() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setType("gradle-project");
|
||||
request.setBootVersion("2.0.0.BUILD-SNAPSHOT");
|
||||
request.setBootVersion("2.0.0.RELEASE");
|
||||
generateProject(request).isGradleProject("4.10.2");
|
||||
}
|
||||
|
||||
@@ -511,7 +430,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
@Test
|
||||
public void gradleBuildWithBootSnapshot() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.0.1.BUILD-SNAPSHOT");
|
||||
request.setBootVersion("2.1.1.BUILD-SNAPSHOT");
|
||||
generateGradleBuild(request).hasSnapshotRepository();
|
||||
}
|
||||
|
||||
@@ -582,50 +501,11 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void gradleBuildBeforeWithSpringBoot13() {
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults()
|
||||
.addDependencyGroup("core", "web", "jpa").setGradleEnv("0.5.9.RELEASE")
|
||||
.build();
|
||||
applyMetadata(metadata);
|
||||
public void gradleBuildWithSpringBoot15() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.2.3.RELEASE");
|
||||
generateGradleBuild(request).contains("springBootVersion = '1.2.3.RELEASE'")
|
||||
.contains(
|
||||
"classpath('io.spring.gradle:dependency-management-plugin:0.5.9.RELEASE')")
|
||||
.contains("apply plugin: 'spring-boot'")
|
||||
.contains("apply plugin: 'io.spring.dependency-management'")
|
||||
.contains(
|
||||
"implementation('org.springframework.boot:spring-boot-starter-web')")
|
||||
.contains(
|
||||
"testImplementation('org.springframework.boot:spring-boot-starter-test')");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void gradleBuildAsFromSpringBoot13() {
|
||||
InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults()
|
||||
.addDependencyGroup("core", "web", "jpa").setGradleEnv("0.5.9.RELEASE")
|
||||
.build();
|
||||
applyMetadata(metadata);
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.3.0.BUILD-SNAPSHOT");
|
||||
request.setBootVersion("1.5.20.BUILD-SNAPSHOT");
|
||||
generateGradleBuild(request)
|
||||
.contains("springBootVersion = '1.3.0.BUILD-SNAPSHOT'")
|
||||
.contains("apply plugin: 'spring-boot'")
|
||||
.contains(
|
||||
"implementation('org.springframework.boot:spring-boot-starter-web')")
|
||||
.contains(
|
||||
"testImplementation('org.springframework.boot:spring-boot-starter-test')")
|
||||
.doesNotContain(
|
||||
"classpath('io.spring.gradle:dependency-management-plugin:0.5.9.RELEASE')")
|
||||
.doesNotContain("apply plugin: 'io.spring.dependency-management'");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void gradleBuildAsFromSpringBoot142() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("1.4.2.BUILD-SNAPSHOT");
|
||||
generateGradleBuild(request)
|
||||
.contains("springBootVersion = '1.4.2.BUILD-SNAPSHOT'")
|
||||
.contains("springBootVersion = '1.5.20.BUILD-SNAPSHOT'")
|
||||
.contains("apply plugin: 'org.springframework.boot'")
|
||||
.contains(
|
||||
"implementation('org.springframework.boot:spring-boot-starter-web')")
|
||||
@@ -635,11 +515,10 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void gradleBuildAsFromSpringBoot20() {
|
||||
public void gradleBuildWithSpringBoot20() {
|
||||
ProjectRequest request = createProjectRequest("web");
|
||||
request.setBootVersion("2.0.0.BUILD-SNAPSHOT");
|
||||
generateGradleBuild(request)
|
||||
.contains("springBootVersion = '2.0.0.BUILD-SNAPSHOT'")
|
||||
request.setBootVersion("2.0.0.RELEASE");
|
||||
generateGradleBuild(request).contains("springBootVersion = '2.0.0.RELEASE'")
|
||||
.contains("apply plugin: 'org.springframework.boot'")
|
||||
.doesNotContain("apply plugin: 'spring-boot'")
|
||||
.contains("apply plugin: 'io.spring.dependency-management'")
|
||||
|
Reference in New Issue
Block a user