Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daggerok/kotlin-coroutines-spring-mvc
spring-webmvc (Tomact Servlet container) + kotlin-coroutines using Konrad Kaminski integration
https://github.com/daggerok/kotlin-coroutines-spring-mvc
coroutines kotlin-coroutines spring-mvc spring-mvc-application spring-mvc-framework
Last synced: 22 days ago
JSON representation
spring-webmvc (Tomact Servlet container) + kotlin-coroutines using Konrad Kaminski integration
- Host: GitHub
- URL: https://github.com/daggerok/kotlin-coroutines-spring-mvc
- Owner: daggerok
- Created: 2019-06-27T01:12:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-27T01:23:46.000Z (over 5 years ago)
- Last Synced: 2024-11-11T15:39:06.068Z (3 months ago)
- Topics: coroutines, kotlin-coroutines, spring-mvc, spring-mvc-application, spring-mvc-framework
- Language: Kotlin
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpringMVC Coroutines [![Build Status](https://travis-ci.org/daggerok/kotlin-coroutines-spring-mvc.svg?branch=master)](https://travis-ci.org/daggerok/kotlin-coroutines-spring-mvc)
Using konrad-kaminski integration```bash
./mvnw
java -jar target/*-SNAPSHOT.jar
http :8080
# see logs / Travis CI output
```## details
_pom.xml_
```xml
1.3.0-M1
org.jetbrains.kotlinx
kotlinx-coroutines-core
${kotlinx-coroutines.version}
org.jetbrains.kotlinx
kotlinx-coroutines-reactor
${kotlinx-coroutines.version}
org.springframework.kotlin
spring-webmvc-kotlin-coroutine
0.3.7
org.springframework.kotlin
spring-kotlin-coroutine
0.3.7
spring-webmvc-kotlin-coroutine
spring-webmvc-kotlin-coroutine
https://dl.bintray.com/konrad-kaminski/maven
true
never
ignore
true
never
ignore
```
_App.kt_
```kotlin
@EnableCoroutine
@SpringBootApplication
class Appfun main(args: Array) {
runApplication(*args)
}
```_MyCoroutinesResource.kt_
```kotlin
@RestController
class MyCoroutinesResource(private val myCoroputinesService: MyCoroutinesService) {private val log = LogManager.getLogger()
@GetMapping("/**")
suspend fun defaultFallback(): Map {
log.info("before")
return myCoroputinesService
.suspendedMethod()
.also { log.info("after") }
}
}
```* [konrad-kaminski / spring-kotlin-coroutine](https://www.kotlinresources.com/library/spring-kotlin-coroutine/#web-methods)
* [YouTube: Asynchronous Programming with Kotlin Coroutines in Spring](https://www.youtube.com/watch?v=aG4ArTL8KHY)