1
0
mirror of https://gitee.com/dcren/initializr.git synced 2025-04-05 17:38:06 +08:00

Adapt test suite to more recent Spring Boot versions

See gh-763
This commit is contained in:
Stephane Nicoll 2018-11-28 17:10:07 +01:00
parent da1655d183
commit dbd865a526
66 changed files with 366 additions and 922 deletions
initializr-actuator/src/test/java/io/spring/initializr/actuate
initializr-generator/src/test
java/io/spring/initializr
resources
metadata/config
project
gradle
groovy
java
kotlin
maven

View File

@ -192,7 +192,7 @@ public class ProjectGenerationMetricsListenerTests {
ProjectRequest request = initialize();
request.resolve(this.metadata);
fireProjectGeneratedEvent(request);
this.metricsAssert.hasValue(1, "initializr.boot_version.1_2_3_RELEASE");
this.metricsAssert.hasValue(1, "initializr.boot_version.2_1_1_RELEASE");
}
@Test

View File

@ -43,7 +43,7 @@ public class ProjectRequestDocumentFactoryTests extends AbstractInitializrStatTe
assertThat(document.getGroupId()).isEqualTo("com.example");
assertThat(document.getArtifactId()).isEqualTo("demo");
assertThat(document.getPackageName()).isEqualTo("com.example.demo");
assertThat(document.getBootVersion()).isEqualTo("1.2.3.RELEASE");
assertThat(document.getBootVersion()).isEqualTo("2.1.1.RELEASE");
assertThat(document.getJavaVersion()).isEqualTo("1.8");
assertThat(document.getLanguage()).isEqualTo("java");
assertThat(document.getPackaging()).isEqualTo("jar");

View File

@ -56,21 +56,21 @@ public class ProjectGeneratorBuildTests extends AbstractProjectGeneratorTests {
}
@Test
public void standardJarJava() {
testStandardJar("java");
public void currentGenerationJarJava() {
testCurrentGenerationJar("java");
}
@Test
public void standardJarGroovy() {
testStandardJar("groovy");
public void currentGenerationJarGroovy() {
testCurrentGenerationJar("groovy");
}
@Test
public void standardJarKotlin() {
testStandardJar("kotlin");
public void currentGenerationJarKotlin() {
testCurrentGenerationJar("kotlin");
}
private void testStandardJar(String language) {
private void testCurrentGenerationJar(String language) {
ProjectRequest request = createProjectRequest();
request.setLanguage(language);
ProjectAssert project = generateProject(request);
@ -79,27 +79,61 @@ public class ProjectGeneratorBuildTests extends AbstractProjectGeneratorTests {
}
@Test
public void standardWarJava() {
testStandardWar("java");
public void currentGenerationWarJava() {
testCurrentGenerationWar("java");
}
@Test
public void standardWarGroovy() {
testStandardWar("groovy");
public void currentGenerationWarGroovy() {
testCurrentGenerationWar("groovy");
}
@Test
public void standardWarKotlin() {
testStandardWar("kotlin");
public void currentGenerationWarKotlin() {
testCurrentGenerationWar("kotlin");
}
private void testStandardWar(String language) {
private void testCurrentGenerationWar(String language) {
ProjectRequest request = createProjectRequest("web");
request.setPackaging("war");
request.setLanguage(language);
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + language + "/war/" + this.assertFileName));
"project/" + language + "/standard/war-" + this.assertFileName));
}
@Test
public void previousGenerationJarJava() {
testPreviousGenerationJar("java");
}
@Test
public void previousGenerationJarGroovy() {
testPreviousGenerationJar("groovy");
}
@Test
public void previousGenerationJarKotlin() {
testPreviousGenerationJar("kotlin");
}
private void testPreviousGenerationJar(String language) {
ProjectRequest request = createProjectRequest();
request.setLanguage(language);
request.setBootVersion("1.5.18.RELEASE");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + language + "/previous/" + this.assertFileName));
}
@Test
public void kotlinJava11() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setJavaVersion("11");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + this.build + "/kotlin-java11-" + this.assertFileName));
}
@Test
@ -185,63 +219,6 @@ public class ProjectGeneratorBuildTests extends AbstractProjectGeneratorTests {
"project/" + this.build + "/bom-ordering-" + this.assertFileName));
}
@Test
public void kotlinJava6() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setJavaVersion("1.6");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + this.build + "/kotlin-java6-" + this.assertFileName));
}
@Test
public void kotlinJava7() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setJavaVersion("1.7");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + this.build + "/kotlin-java7-" + this.assertFileName));
}
@Test
public void kotlinSpringBoot2Legacy() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setBootVersion("2.0.0.M5");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/main/kotlin/com/example/demo/DemoApplication.kt")
.equalsTo(new ClassPathResource(
"project/kotlin/spring-boot-2.0/DemoApplicationLegacy.kt.gen"));
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource("project/"
+ this.build + "/kotlin-springboot2-legacy-" + this.assertFileName));
}
@Test
public void kotlinSpringBoot2() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setBootVersion("2.0.0.M6");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/main/kotlin/com/example/demo/DemoApplication.kt")
.equalsTo(new ClassPathResource(
"project/kotlin/spring-boot-2.0/DemoApplication.kt.gen"));
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + this.build + "/kotlin-springboot2-" + this.assertFileName));
}
@Test
public void kotlinJava9() {
ProjectRequest request = createProjectRequest();
request.setLanguage("kotlin");
request.setBootVersion("2.0.0.M6");
request.setJavaVersion("9");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert(this.fileName).equalsTo(new ClassPathResource(
"project/" + this.build + "/kotlin-java9-" + this.assertFileName));
}
@Override
public ProjectRequest createProjectRequest(String... styles) {
ProjectRequest request = super.createProjectRequest(styles);

View File

@ -52,7 +52,7 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardJar() {
public void currentGenerationJar() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
generateProject(request).isGenericProject(ProjectAssert.DEFAULT_PACKAGE_NAME,
@ -60,7 +60,7 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardWar() {
public void currentGenerationWar() {
ProjectRequest request = createProjectRequest("web");
request.setLanguage(this.language);
request.setPackaging("war");
@ -69,7 +69,7 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardMainClass() {
public void currentGenerationMainClass() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
@ -81,7 +81,19 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardTestClass() {
public void previousGenerationMainClass() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
request.setBootVersion("1.5.18.RELEASE");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/main/" + this.language
+ "/com/example/demo/DemoApplication." + this.extension)
.equalsTo(new ClassPathResource("project/" + this.language + "/previous/"
+ "/DemoApplication." + this.expectedExtension));
}
@Test
public void currentGenerationTestClass() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
@ -93,7 +105,7 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardTestClassWeb() {
public void currentGenerationTestClassWeb() {
ProjectRequest request = createProjectRequest("web");
request.setLanguage(this.language);
@ -105,79 +117,28 @@ public class ProjectGeneratorLanguageTests extends AbstractProjectGeneratorTests
}
@Test
public void standardServletInitializer() {
testServletInitializr(null, "standard");
}
@Test
public void springBoot14M2ServletInitializer() {
testServletInitializr("1.4.0.M2", "standard");
}
@Test
public void springBoot14ServletInitializer() {
testServletInitializr("1.4.0.M3", "spring-boot-1.4");
}
@Test
public void springBoot2ServletInitializer() {
testServletInitializr("2.0.0.M3", "spring-boot-2.0");
}
private void testServletInitializr(String bootVersion, String expectedOutput) {
public void currentGenerationServletInitializer() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
request.setPackaging("war");
if (bootVersion != null) {
request.setBootVersion(bootVersion);
}
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/main/" + this.language
+ "/com/example/demo/ServletInitializer." + this.extension)
.equalsTo(new ClassPathResource(
"project/" + this.language + "/" + expectedOutput
+ "/ServletInitializer." + this.expectedExtension));
.equalsTo(new ClassPathResource("project/" + this.language + "/standard/"
+ "ServletInitializer." + this.expectedExtension));
}
@Test
public void springBoot14M1TestClass() {
public void previousGenerationServletInitializer() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
request.setBootVersion("1.4.0.M1");
request.setBootVersion("1.5.18.RELEASE");
request.setPackaging("war");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/test/" + this.language
+ "/com/example/demo/DemoApplicationTests." + this.extension)
.equalsTo(new ClassPathResource("project/" + this.language
+ "/standard/DemoApplicationTests." + this.expectedExtension));
}
@Test
public void springBoot14TestClass() {
ProjectRequest request = createProjectRequest();
request.setLanguage(this.language);
request.setBootVersion("1.4.0.M2");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/test/" + this.language
+ "/com/example/demo/DemoApplicationTests." + this.extension)
.equalsTo(new ClassPathResource("project/" + this.language
+ "/spring-boot-1.4/DemoApplicationTests."
+ this.expectedExtension));
}
@Test
public void springBoot14TestClassWeb() {
ProjectRequest request = createProjectRequest("web");
request.setLanguage(this.language);
request.setBootVersion("1.4.0.M2");
ProjectAssert project = generateProject(request);
project.sourceCodeAssert("src/test/" + this.language
+ "/com/example/demo/DemoApplicationTests." + this.extension)
.equalsTo(new ClassPathResource("project/" + this.language
+ "/spring-boot-1.4/DemoApplicationTests."
+ this.expectedExtension));
project.sourceCodeAssert("src/main/" + this.language
+ "/com/example/demo/ServletInitializer." + this.extension)
.equalsTo(new ClassPathResource("project/" + this.language + "/previous/"
+ "ServletInitializer." + this.expectedExtension));
}
}

View File

@ -114,7 +114,7 @@ public class InitializrMetadataBuilderTests {
assertThat(myBom).isNotNull();
assertThat(myBom.getGroupId()).isEqualTo("org.acme");
assertThat(myBom.getArtifactId()).isEqualTo("my-bom");
assertThat(myBom.getVersion()).isEqualTo("1.2.3.RELEASE");
assertThat(myBom.getVersion()).isEqualTo("2.1.1.RELEASE");
BillOfMaterials anotherBom = boms.get("another-bom");
assertThat(anotherBom).isNotNull();

View File

@ -165,9 +165,10 @@ public class InitializrMetadataTestBuilder {
}
public InitializrMetadataTestBuilder addDefaultBootVersions() {
return addBootVersion("1.1.2.RELEASE", false)
.addBootVersion("1.2.3.RELEASE", true)
.addBootVersion("1.3.0.BUILD-SNAPSHOT", false);
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);
}
public InitializrMetadataTestBuilder addBootVersion(String id, boolean defaultValue) {

View File

@ -6,7 +6,7 @@
"my-bom": {
"groupId": "org.acme",
"artifactId": "my-bom",
"version": "1.2.3.RELEASE"
"version": "2.1.1.RELEASE"
},
"another-bom": {
"groupId": "org.acme",

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -1,12 +1,10 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '2.0.0.M6'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@ -23,7 +21,7 @@ apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 9
sourceCompatibility = 11
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
@ -39,8 +37,6 @@ compileTestKotlin {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}

View File

@ -1,47 +0,0 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '1.2.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.6
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
repositories {
mavenCentral()
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
implementation("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -1,47 +0,0 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '1.2.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.7
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
repositories {
mavenCentral()
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -1,52 +0,0 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '2.0.0.M6'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -0,0 +1,12 @@
package com.example.demo
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
@SpringBootApplication
class DemoApplication {
static void main(String[] args) {
SpringApplication.run DemoApplication, args
}
}

View File

@ -0,0 +1,30 @@
buildscript {
ext {
springBootVersion = '1.5.18.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
implementation('org.codehaus.groovy:groovy')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.18.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
<goal>addTestSources</goal>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>testGenerateStubs</goal>
<goal>testCompile</goal>
<goal>removeStubs</goal>
<goal>removeTestStubs</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,16 +0,0 @@
package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner)
@SpringBootTest
class DemoApplicationTests {
@Test
void contextLoads() {
}
}

View File

@ -1,13 +0,0 @@
package com.example.demo
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
application.sources(DemoApplication)
}
}

View File

@ -2,11 +2,11 @@ package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.SpringApplicationConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringJUnit4ClassRunner)
@SpringApplicationConfiguration(classes = DemoApplication)
@RunWith(SpringRunner)
@SpringBootTest
class DemoApplicationTests {
@Test

View File

@ -2,13 +2,11 @@ package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.SpringApplicationConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.test.context.web.WebAppConfiguration
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringJUnit4ClassRunner)
@SpringApplicationConfiguration(classes = DemoApplication)
@WebAppConfiguration
@RunWith(SpringRunner)
@SpringBootTest
class DemoApplicationTests {
@Test

View File

@ -1,7 +1,7 @@
package com.example.demo
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.web.SpringBootServletInitializer
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
class ServletInitializer extends SpringBootServletInitializer {

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'groovy'
apply plugin: 'eclipse-wtp'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -0,0 +1,12 @@
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}

View File

@ -0,0 +1,29 @@
buildscript {
ext {
springBootVersion = '1.5.18.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.18.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,16 +0,0 @@
package com.example.demo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemoApplicationTests {
@Test
public void contextLoads() {
}
}

View File

@ -1,13 +0,0 @@
package com.example.demo;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(DemoApplication.class);
}
}

View File

@ -2,11 +2,11 @@ package com.example.demo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DemoApplication.class)
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemoApplicationTests {
@Test

View File

@ -2,13 +2,11 @@ package com.example.demo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DemoApplication.class)
@WebAppConfiguration
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemoApplicationTests {
@Test

View File

@ -1,7 +1,7 @@
package com.example.demo;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -1,19 +1,18 @@
buildscript {
ext {
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -1,12 +1,10 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '2.0.0.M5'
springBootVersion = '1.5.18.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@ -19,7 +17,6 @@ apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
@ -39,8 +36,6 @@ compileTestKotlin {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}

View File

@ -14,14 +14,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>1.5.18.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<java.version>1.8</java.version>
<kotlin.version>1.1.1</kotlin.version>
</properties>
@ -32,7 +32,7 @@
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
@ -67,6 +67,7 @@
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
<execution>

View File

@ -1,16 +0,0 @@
package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
@SpringBootTest
class DemoApplicationTests {
@Test
fun contextLoads() {
}
}

View File

@ -1,11 +0,0 @@
package com.example.demo
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class DemoApplication
fun main(args: Array<String>) {
runApplication<DemoApplication>(*args)
}

View File

@ -1,12 +0,0 @@
package com.example.demo
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
class ServletInitializer : SpringBootServletInitializer() {
override fun configure(application: SpringApplicationBuilder) : SpringApplicationBuilder {
return application.sources(DemoApplication::class.java)
}
}

View File

@ -1,11 +1,11 @@
package com.example.demo
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class DemoApplication
fun main(args: Array<String>) {
SpringApplication.run(DemoApplication::class.java, *args)
runApplication<DemoApplication>(*args)
}

View File

@ -2,11 +2,11 @@ package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.SpringApplicationConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringJUnit4ClassRunner::class)
@SpringApplicationConfiguration(classes = arrayOf(DemoApplication::class))
@RunWith(SpringRunner::class)
@SpringBootTest
class DemoApplicationTests {
@Test

View File

@ -2,13 +2,11 @@ package com.example.demo
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.SpringApplicationConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.test.context.web.WebAppConfiguration
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringJUnit4ClassRunner::class)
@SpringApplicationConfiguration(classes = arrayOf(DemoApplication::class))
@WebAppConfiguration
@RunWith(SpringRunner::class)
@SpringBootTest
class DemoApplicationTests {
@Test

View File

@ -1,7 +1,7 @@
package com.example.demo
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.web.SpringBootServletInitializer
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
class ServletInitializer : SpringBootServletInitializer() {

View File

@ -1,14 +1,13 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
@ -17,7 +16,7 @@ buildscript {
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
@ -43,7 +42,7 @@ repositories {
dependencies {
implementation('org.springframework.boot:spring-boot-starter')
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@ -33,12 +33,10 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
@ -59,7 +57,6 @@
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
@ -67,24 +64,7 @@
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>

View File

@ -1,14 +1,13 @@
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '1.2.3.RELEASE'
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
@ -17,7 +16,7 @@ buildscript {
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse-wtp'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
@ -47,8 +46,8 @@ configurations {
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@ -33,12 +33,10 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
@ -64,7 +62,6 @@
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
@ -72,24 +69,7 @@
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

View File

@ -14,14 +14,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.6</java.version>
<java.version>11</java.version>
<kotlin.version>1.1.1</kotlin.version>
</properties>
@ -32,13 +32,11 @@
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
@ -59,7 +57,6 @@
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
@ -68,22 +65,6 @@
<plugin>spring</plugin>
</compilerPlugins>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>9</java.version>
<kotlin.version>1.1.1</kotlin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
</args>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<kotlin.version>1.1.1</kotlin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
</args>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<kotlin.version>1.1.1</kotlin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<configuration>
<args>
<arg>-Xjsr305=strict</arg>
</args>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>