MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    Java设置Config默认值的问题

    技术交流板块
    2
    3
    224
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SaltlyFish last edited by

      我根据文档中的示例尝试创建一个无默认值的list
      83d755a6-0745-4d8b-8a10-d170e21c249c-image.png
      但是IDEA报错,我应该如何解决这个问题
      0bdbdd11-e83a-43ac-a81f-e3c7eddc7a3c-image.png

      1 Reply Last reply Reply Quote 0
      • MrXiaoM
        MrXiaoM 童心未泯 last edited by MrXiaoM

        文档有误,应当是

        typedValue("name", createKType(...))
        

        此外,更推荐用 Kotlin 编写配置,写起来会更简短、更方便

        S 1 Reply Last reply Reply Quote 0
        • S
          SaltlyFish @MrXiaoM last edited by

          @MrXiaoM 感谢大佬解惑,目前正在学习Kotlin,未来会考虑换为Kotlin重构代码awa

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact