BAEL-890 - Kotlin-Allopen with Spring example

This commit is contained in:
Dassi Orleando 2017-09-07 23:44:30 +01:00
parent ee29c4db55
commit cccaa8c4ad
3 changed files with 45 additions and 2 deletions

View File

@ -45,6 +45,12 @@
<artifactId>thymeleaf-spring4</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.3.10.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@ -55,7 +61,12 @@
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>1.1.4</version>
<configuration>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
@ -64,7 +75,6 @@
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
@ -73,6 +83,13 @@
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>1.1.4-3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

View File

@ -0,0 +1,7 @@
package com.baeldung.kotlin.allopen
import org.springframework.context.annotation.Configuration
@Configuration
class SimpleConfiguration {
}

View File

@ -0,0 +1,19 @@
package com.baeldung.kotlin.allopen
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.test.context.support.AnnotationConfigContextLoader
@RunWith(SpringJUnit4ClassRunner::class)
@ContextConfiguration(
loader = AnnotationConfigContextLoader::class,
classes = arrayOf(SimpleConfiguration::class))
class SimpleConfigurationTest {
@Test
fun contextLoads() {
}
}