Skip to content

Commit 488eab1

Browse files
Dassi orleandopivovarit
authored andcommitted
BAEL-890 - Kotlin-Allopen with Spring example (eugenp#2582)
* Different types of bean injection in Spring * Difference between two dates in java * Update README.md * Simple clean of difference between dates * Clean my test article * Improve dates diff: for dates and datetimes * Move difference between dates from core-java to libraries * BAEL-890 - Kotlin-Allopen with Spring example
1 parent 4edcd08 commit 488eab1

4 files changed

Lines changed: 47 additions & 2 deletions

File tree

‎libraries/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@
648648
<streamex.version>0.6.5</streamex.version>
649649
<vavr.version>0.9.0</vavr.version>
650650
<geotools.version>15.2</geotools.version>
651+
<joda-time.version>2.9.9</joda-time.version>
652+
<hirondelle-date4j.version>1.5.1</hirondelle-date4j.version>
651653
<retrofit.version>2.3.0</retrofit.version>
652654
<joda-time.version>2.9.9</joda-time.version>
653655
<hirondelle-date4j.version>1.5.1</hirondelle-date4j.version>

‎spring-mvc-kotlin/pom.xml‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
<artifactId>thymeleaf-spring4</artifactId>
4646
<version>3.0.7.RELEASE</version>
4747
</dependency>
48+
<dependency>
49+
<groupId>org.springframework</groupId>
50+
<artifactId>spring-test</artifactId>
51+
<version>4.3.10.RELEASE</version>
52+
<scope>test</scope>
53+
</dependency>
4854
</dependencies>
4955

5056
<build>
@@ -55,7 +61,12 @@
5561
<artifactId>kotlin-maven-plugin</artifactId>
5662
<groupId>org.jetbrains.kotlin</groupId>
5763
<version>1.1.4</version>
58-
64+
<configuration>
65+
<compilerPlugins>
66+
<plugin>spring</plugin>
67+
</compilerPlugins>
68+
<jvmTarget>1.8</jvmTarget>
69+
</configuration>
5970
<executions>
6071
<execution>
6172
<id>compile</id>
@@ -64,7 +75,6 @@
6475
<goal>compile</goal>
6576
</goals>
6677
</execution>
67-
6878
<execution>
6979
<id>test-compile</id>
7080
<phase>test-compile</phase>
@@ -73,6 +83,13 @@
7383
</goals>
7484
</execution>
7585
</executions>
86+
<dependencies>
87+
<dependency>
88+
<groupId>org.jetbrains.kotlin</groupId>
89+
<artifactId>kotlin-maven-allopen</artifactId>
90+
<version>1.1.4-3</version>
91+
</dependency>
92+
</dependencies>
7693
</plugin>
7794
</plugins>
7895
</build>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.baeldung.kotlin.allopen
2+
3+
import org.springframework.context.annotation.Configuration
4+
5+
@Configuration
6+
class SimpleConfiguration {
7+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.baeldung.kotlin.allopen
2+
3+
import org.junit.Test
4+
import org.junit.runner.RunWith
5+
import org.springframework.test.context.ContextConfiguration
6+
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
7+
import org.springframework.test.context.support.AnnotationConfigContextLoader
8+
9+
@RunWith(SpringJUnit4ClassRunner::class)
10+
@ContextConfiguration(
11+
loader = AnnotationConfigContextLoader::class,
12+
classes = arrayOf(SimpleConfiguration::class))
13+
class SimpleConfigurationTest {
14+
15+
@Test
16+
fun contextLoads() {
17+
}
18+
19+
}

0 commit comments

Comments
 (0)