【报错】mac m1 gateway 报错

今天写项目出现以下报错:

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'.

出现这个问题是因为自己在 m1芯片的 mac 电脑安装使用了spring-cloud-starter-gateway依赖,这需要额外安装netty-resolver-dns-native-macos依赖。

由于我装的 gateway 版本为4.1.0,所以我需要安装支持4.1.0 版本的netty-resolver-dns-native-macos

pom 相关依赖如下:

xml 复制代码
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-resolver-dns-native-macos</artifactId>
    <scope>runtime</scope>
    <classifier>osx-aarch_64</classifier>
</dependency>

运行后,相关的报错消失,完事儿!

相关推荐
guojl41 分钟前
RestTemplate使用手册
spring cloud·微服务
guojl41 分钟前
RestTemplate原理分析
spring cloud·微服务
booooooty1 小时前
基于Spring AI Alibaba的多智能体RAG应用
java·人工智能·spring·多智能体·rag·spring ai·ai alibaba
极光雨雨1 小时前
Spring Bean 控制销毁顺序的方法总结
java·spring
Ken_11151 小时前
SpringCloud系列(51)--SpringCloud Stream之使用分组解决消息重复消费问题
spring cloud
Spirit_NKlaus1 小时前
解决HttpServletRequest无法获取@RequestBody修饰的参数
java·spring boot·spring
lwb_01182 小时前
SpringCloud——Gateway新一代网关
spring·spring cloud·gateway
你是人间五月天2 小时前
gateway断言配置详解
gateway
weixin_387545643 小时前
深入解析 AI Gateway:新一代智能流量控制中枢
人工智能·gateway
程序猿小D4 小时前
[附源码+数据库+毕业论文]基于Spring+MyBatis+MySQL+Maven+jsp实现的电影小说网站管理系统,推荐!
java·数据库·mysql·spring·毕业设计·ssm框架·电影小说网站