Mac中redisson启动报错

redisson的配置:

redis:
  config: |
    singleServerConfig:
      idleConnectionTimeout: 10000
      connectTimeout: 10000
      timeout: 3000
      retryAttempts: 3
      retryInterval: 1500
      password: null
      subscriptionsPerConnection: 5
      clientName: null
      address: "redis://127.0.0.1:6379"
      subscriptionConnectionMinimumIdleSize: 1
      subscriptionConnectionPoolSize: 50
      connectionMinimumIdleSize: 24
      connectionPoolSize: 64
      database: 0
      dnsMonitoringInterval: 5000
    threads: 16
    nettyThreads: 32
    codec: !<org.redisson.codec.Kryo5Codec> { }
    transportMode: "NIO"

启动错误:

Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'

解决方案:

根据提示添加对应的jar包,如下代码,填写对应的系统架构

<dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-resolver-dns-native-macos</artifactId>
      <classifier>osx-x86_64</classifier>
      <version>4.1.111.Final</version>
      <scope>runtime</scope>
</dependency>

<classifier>osx-x86_64</classifier> 为系统架构,目前已知:

osx-x86_64、osx-aarch_64

可在 <artifactId>netty-all</artifactId> 这个全量包中查看

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    请登录后查看评论内容