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

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

相关推荐
乐观的Terry4 小时前
11、发布系统-用户认证与权限体系
java·spring boot·spring·spring cloud·mybatis
ruleslol6 小时前
如何解决 Spring 中的循环依赖问题?
spring
赶路人儿8 小时前
MacOS 下实现 AI 操控电脑(Computer Use)的思考
人工智能·macos·策略模式
Flittly9 小时前
【我的手搓轮子日记】(2)handmade-ioc 手搓 IOC 容器
java·spring boot·spring
程序员钟霖9 小时前
【实战版】Spring IOC 控制反转详解
java·后端·spring·maven·intellij-idea
00后程序员张9 小时前
使用Instruments工具深入分析iOS应用性能与启动时间优化
android·macos·ios·小程序·uni-app·cocoa·iphone
玖石书9 小时前
ASP.NET Core迁移Spring系列:运行时与 GC 篇
后端·spring·asp.net
钱六两9 小时前
Spring AI 使用 MCP 客户端(调用高德 MCP)
java·人工智能·spring
2601_9609067210 小时前
AI研发加速中式及泛亚洲
人工智能·vscode·macos·sublime text·phpstorm
sg_knight10 小时前
Codex CLI 安装全攻略:macOS / Linux / Windows(WSL2)三端实战
linux·windows·macos·openai·ai编程·coding·codex