DNS Resolution Problem at start on Apple M2

最近把 Spring Boot 升級到 3.2.1 後、莫名的遇到了以下的警告:

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'. Use DEBUG level to see the full stack: java.lang.UnsatisfiedLinkError: failed to load the required native library

經查:應該是因為在使用M晶片的 macOS 上缺了系統需要的 Library。

在 pom.xml 加入以下依賴即可解決:

<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>

Struts 2.X of Eclipse for J2EE – 安裝

Struts 在 Eclipse 中設置方法的教學在網路上很多;信手拈來就是一堆,自己寫一個當做是記錄、也是檢視自己是否透撤瞭解的一個方法。

閱讀全文〈Struts 2.X of Eclipse for J2EE – 安裝〉

Maven 初探

目的:

Maven 是一個專案管理和建構自動化工具。主要用來管理大量的外部資源庫(External JARs)、避免統一協作時造成匯入資源庫版本的不一致或漏失 JAR 的狀況出現。

優點:

一、對於外部匯入資源庫做統一的版本管理。
二、專案目錄結構的統一。
三、軟體架構階段的統一。

缺點:

一、第三方資源庫版本混亂。
二、網上教學文不詳細或容易混淆。
三、資源庫不完整。

The Central Repository Search Engine

閱讀全文〈Maven 初探〉