首页 > 解决方案 > 创建 Micronaut 命令行应用程序时 Kotlin 不兼容

问题描述

每当我尝试使用 Micronaut 和 Kotlin 创建命令行应用程序时:

mn create-cli-app cli2 --features kotlin

我收到以下警告:

| Warning The following features are incompatible with other feature selections and have been removed from the project | kotlin

生成的项目已经回退到Java,非常优雅。

这是“错误”还是当前预期的行为?

标签: kotlincommand-linemicronaut

解决方案


要选择语言(java、groovy 或 kotlin),最好使用--lang标志而不是--features. 正在做:

$ mn create-cli-app mycli --lang=kotlin
| Generating Kotlin project...
| Application created at /tmp/mycli

按预期工作。


推荐阅读