在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):raharrison/kotlin-ktor-exposed-starter开源软件地址(OpenSource Url):https://github.com/raharrison/kotlin-ktor-exposed-starter开源编程语言(OpenSource Language):Kotlin 90.4%开源软件介绍(OpenSource Introduction):Starter project to create a simple RESTful web service in KotlinUpdated for Kotlin 1.6.20 and Ktor 2.0.0 Companion article: https://ryanharrison.co.uk/2018/04/14/kotlin-ktor-exposed-starter.html Getting Started
Libraries used:
The starter project creates a new in-memory H2 database with one table for As ktor is async and based on coroutines, standard blocking JDBC may cause performance issues when used directly on the main thread pool (as threads must be reused for other requests). Therefore, another dedicated thread pool is created for all database queries, alongside connection pooling with HikariCP. Routes:
returns
Notifications (WebSocket)All updates (creates, updates and deletes) to
{
"type": "CREATE",
"id": 12,
"entity": {
"id": 12,
"name": "widget1",
"quantity": 5,
"dateUpdated": 1533583858169
}
} The websocket listener will also log out any text messages send by the client. Refer to this blog post for some useful tools to test the websocket behaviour. TestingThe sample Widget service and corresponding endpoints are also tested with 100% coverage. Upon startup of the main JUnit suite (via the
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论