Spring Boot Web Flux with JOOQ for interfacing with DB and Kotlin coroutines to make blocking JDBC calls run asynchronously. Now with rsockets.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
package com.example.demo.controller
import com.example.demo.service.UserService import kotlinx.coroutines.coroutineScope import org.springframework.messaging.handler.annotation.DestinationVariable import org.springframework.messaging.handler.annotation.MessageMapping import org.springframework.stereotype.Component
@Component class RsocketDemoController(private val userService: UserService) { @MessageMapping("messages.findAll") suspend fun all() = coroutineScope { userService.getAllMessages() }
@MessageMapping("users.{name}") suspend fun getUser(@DestinationVariable name: String) = coroutineScope { userService.getUserByName(name) } }
|