Swanand Keskar
03/01/2021, 2:47 PMMicronautLambdaContainerHandler
?Cameron Stuart
06/11/2021, 4:58 PMCameron Stuart
06/16/2021, 2:10 AM@MicronautTest
in intellij don't have the execution arrow in the gutter to run individual tests?Cameron Stuart
06/16/2021, 2:11 AMCameron Stuart
07/05/2021, 7:48 AMhandle
from my hikari/jdbc connected databasedpux
10/21/2021, 5:50 PMwithContext
is throwing null pointer exception in my code. This seems like a new issue, never faced this before. Using Micronaut 3.1.0, Kotlin 1.5.31, kotlin-runtime 3.1.0gbaldeck
03/15/2022, 3:51 PMThe following options were not recognized by any processor: '[micronaut.processing.group,, kapt.kotlin.generated]'
Christian Oleson
04/03/2022, 3:38 AMJúlio Santos
05/11/2022, 1:25 AMCésar
06/23/2022, 2:48 PMJúlio Santos
07/18/2022, 9:34 PMSam Gammon
11/09/2022, 7:59 PMSam Gammon
11/10/2022, 4:02 AMSam Gammon
11/10/2022, 4:02 AMSam Gammon
01/01/2023, 2:54 AMnative-image
is supported out of the box.
• 🚀 Trying it out
curl -sSL --tlsv1.2 dl.elide.dev/cli/install.sh | bash -s -
👆 the one liner works on Darwin (amd64/arm64), and Linux (amd64) so far.If you prefer NPX:
npx @elide-dev/elide@alpha shell
K Building Kotlin apps with it
•
Elide can be used as a plain library with a regular Micronaut server, and Ktor support is on the way. There are Maven artifacts in a custom repository which is easy to use during the alpha; you can see a sample here.
• G Gradle plugin
You can easily install the Gradle plugin to build your frontend assets and your Kotlin/JS, and package it into your server binary. It will handle building for SSR and CSR both, so you can easily switch between browser rendering modes. Check it out here. Maven and Bazel support are planned.
• 🖥️ Using the shell
elide shell
drops you into a shell just like Node (see attached screenshot), the difference being the URL
class we're using here is implemented in Kotlin, backed by the road-tested power of Micronaut, KotlinX, Netty, and the Java standard library. It has simply been adapted for use in JavaScript, according to the WhatWG URL Spec.
• js Use Kotlin/JS or regular Node stack
Elide packages and consumes your JS/TS with built-in support for esbuild
, so you can use a standard Node toolchain or the Kotlin/JS stack.
• 💨 Super fast React SSR
Because Elide is basically Kotlin with a super-fast JS runtime attached, it can do JS SSR without leaving the JVM. This can soon be drop-in compatible with many React apps. You can see a live sample here to confirm it is fast and server-rendered. The code for that sample is pasted below to show how simple it is to call back and forth between Kotlin and your React app:
@Page class Index : PageWithProps<YourProps>(YourProps.serializer()) {
// Serve React SSR.
@Get("/") suspend fun indexPage(request: HttpRequest<*>) = ssr(request) { // 1: tell the server we're going to do SSR for this request
head {
title { +"Hello, Elide!" }
stylesheet("/styles/base.css")
stylesheet("/styles/main.css")
script("/scripts/ui.js", defer = true) // <-- 2: serve the CSR bundle so it can hydrate the react SSR response
}
body {
injectSSR(this@Index, request) // <-- 3: execute the JS VM to produce the SSR response, and splice it into the server response
}
}
}
• 🐙 Contributors needed
The future of software is much more polyglot than today's paradigm: developers love to fight about frameworks, but at the end of the day, we're all writing code, and eliminating barriers between languages means easier collaboration and more value for all of us. It shouldn't be a Node vs. The World or a Rust vs. The World argument; we should get to pick and pull the best code we want from anywhere and use it to build our apps, especially from a multi-platform language like Kotlin.
This runtime and framework are designed for that future. *If you agree, join us and make a dent in the universe*; you'll have a chance to be impactful and shape a brave new idea from the ground up.
• 🙏 Thank you
We chose Kotlin because of the fantastic community. 2023 will be a massive year for Kotlin, and we think that betting the farm on it is reasonable and smart. We are super excited about what JetBrains and Kotlin have in store for us with K2, context receivers, value classes... just so much to look forward to.
Cheers and happy new year, Kotlin devs,
K sam
Slack ConversationUbed
01/04/2023, 1:09 PMJohannes Gätjen
01/13/2023, 1:52 PM/swagger-ui/res/flattop.css 0002ms
/swagger-ui/res/swagger-ui-bundle.js 0002ms
/swagger-ui/res/swagger-ui.css 0001ms
/swagger-ui/res/swagger-ui-standalone-preset.js 0002ms
Anyone here who has experienced this and knows if this is intended or if there is a quick workaround (besides downgrading)?kqr
01/16/2023, 9:14 AMjames
05/30/2023, 11:25 PM@View
functionality, but it does serve a static website, so when Google’s login flow redirects the user to <http://localhost:3000/oauth/callback/google>
with a successful login, I am not sure how to proceed
ideally I would like to:
• catch that callback, validate the id token with Google ✅
• generate a user session token ✅
• store the user session token in a cookie ❓
• bounce the user to a specific statically served page ❓
the checks are the parts I know how to do, the question marks are the parts I am unsure about. any tips would be greatly appreciated 🙏Khurram Malik
06/08/2023, 9:48 AMplugins {
id("org.jetbrains.kotlin.jvm") version "1.8.20"
id("org.jetbrains.kotlin.plugin.allopen") version "1.8.20"
id("com.google.devtools.ksp") version "1.8.20-1.0.10"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.0.0-M2"
}
version = project.properties["version"] as String? ?: "0.0.1"
group = "dk.****"
val kotlinVersion = project.properties["kotlinVersion"]
repositories {
mavenCentral()
}
dependencies {
implementation("io.micronaut:micronaut-jackson-databind")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("io.micronaut:micronaut-management")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
testImplementation("io.micronaut:micronaut-http-client")
}
application {
mainClass.set("dk.***.ApplicationKt")
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
}
tasks {
compileKotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
compileTestKotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
}
graalvmNative.toolchainDetection.set(false)
micronaut {
runtime("netty")
testRuntime("kotest5")
processing {
incremental(true)
annotations("dk.***.*")
}
}
Phil Richardson
07/16/2023, 1:17 PMmicronaut.ssl.key.alias
value, but it is deciding to use a different entry to the requested one.
I do note that listing entries with keytool, it is the first entry from the output being used, though I don't strictly see this as weight on what is going on.
I know this is not strictly Kotlin related, but does anybody have any clues as to what is going on, or better, tips to diagnose the cause?bob
11/30/2023, 10:45 AMsuspend
on the controllers and let micronaut handle most of the wiring.
But my team has made me aware of a potential issue that using coroutines and @Transactional
doesn't work straight out of the box. And I can't find a resolute documentation on any limitations or caveats on it.
Does anyone have a good answer/documentation on the subject?bob
12/15/2023, 4:17 PMContext propagation
when using Coroutines?Slackbot
01/03/2024, 4:15 PMUbed
01/31/2024, 2:01 PMPublisher<CompletedFileUpload>
to receive multiple file uploads but it returns more files than expected.
is there any work around or any suggestions.
I'm working in Micronaut kotlin.Artyom Gornostayev
03/28/2024, 11:26 AM@GeneratedValue
?
I'm using Micronaut Data with R2DBC.
I have a class:
data class Product(
@Id
@GeneratedValue
var id: Long? = null,
val publicId: UUID,
val code: String,
...
)
When I'm trying to save a new record (id = null
) with repository.save(product)
the exception has thrown...
null value in column "id" of relation "products" violates not-null constraint
I'm not sure what is wrong...bob
06/04/2024, 7:20 AMCoroutineCrudRepository
and not pure Project Reactor.
Also the `@R2dbcRepository(dialect = Dialect.POSTGRES)`on my repos.Christian Oleson
10/07/2024, 3:27 AMRobert Jaros
11/05/2024, 6:35 PMuseKSP2=true
I'm getting errors like this:
e: [ksp] Error processing type visitor [io.micronaut.context.visitor.ExecutableVisitor@49e3e5e7]: null
e: [ksp] java.lang.NullPointerException
If it's not, does it mean I will not be able to use Micronaut with Kotlin 2.1.0 at all (Kotlin 2.1 will not support KSP1 any more)?Ubed
03/18/2025, 12:15 AMMicronaut 4.7.6
?
And upgrade its compatible dependencies?