gpt4 book ai didi

maven - Javalin 教程产生 "Unresolved reference: AtomicInteger"

转载 作者:行者123 更新时间:2023-12-02 12:48:35 24 4
gpt4 key购买 nike

标题说了算。关注 Javalin tutorial作为学习 kotlin 并在 mvn package 上获得未解决引用的一部分.我想我需要引入一个依赖项,但是这个例子没有显示它,而且谷歌让我失望了。我的 pom.xml 很大,但我的版本信息如下:

<properties>
<kotlin.version>1.1.3-2</kotlin.version>
</properties>

我当前的依赖列表是:
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>io.javalin</groupId>
<artifactId>javalin</artifactId>
<version>0.3.3</version>
</dependency>
</dependencies>

不太确定从这里去哪里。

最佳答案

在类(class)UserDao您忘记添加以下导入

import java.util.concurrent.atomic.AtomicInteger

该示例的所有来源都可以在 github ( https://github.com/tipsy/javalin-kotlin-example) 上找到,因此您可以将其作为引用。

关于maven - Javalin 教程产生 "Unresolved reference: AtomicInteger",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44961868/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com