【报错】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>

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

相关推荐
带刺的坐椅5 小时前
无耳科技 Solon v3.0.7 发布(2025农历新年版)
java·spring·mvc·solon·aop
精通HelloWorld!8 小时前
使用HttpClient和HttpRequest发送HTTP请求
java·spring boot·网络协议·spring·http
LUCIAZZZ9 小时前
基于Docker以KRaft模式快速部署Kafka
java·运维·spring·docker·容器·kafka
拾忆,想起9 小时前
如何选择Spring AOP的动态代理?JDK与CGLIB的适用场景
spring boot·后端·spring·spring cloud·微服务
鱼骨不是鱼翅10 小时前
Spring Web MVC基础第一篇
前端·spring·mvc
追光天使11 小时前
Mac M1 源码安装FFmpeg,开启enable-gpl 和 lib x264
macos·ffmpeg
hong_zc12 小时前
Spring MVC (三) —— 实战演练
java·spring·mvc
会飞的爱迪生13 小时前
mac和linux传输文件
linux·运维·macos
Future_yzx14 小时前
Spring AOP 入门教程:基础概念与实现
java·开发语言·spring
安清h14 小时前
【基于SprintBoot+Mybatis+Mysql】电脑商城项目之用户注册
数据库·后端·mysql·spring·mybatis