取得 Liberty 上的伺服器名稱

此規則標示下列方法的參照:

在 Liberty 上無法使用這些方法。

此規則具有自動化修正程式。 將自訂配置複製到應用程式建置檔,以啟用修正程式自動化。

原始檔掃描器提供的快速修正程式,可將上述方法的任何參照變更成 java.lang.System.getProperty("wlp.server.name"),以擷取 Liberty 伺服器的名稱。此解決方案不適用於 WebSphere Application Server Traditional。

如需替代方案,請參閱文件中的 Programmatic access to location properties 一節。