歷史

history 命令顯示已執行的命令歷史記錄。

您可以使用一些配置選項來配置歷史記錄的行為。歷史記錄儲存在日誌檔案中,該檔案預設啟用,可以透過設定 spring.shell.history.enabled 來關閉。日誌檔案的名稱從 spring.application.name 解析,預設為 spring-shell.log,您可以透過設定 spring.shell.history.name 進行更改。

預設情況下,日誌檔案生成在當前工作目錄中,您可以透過設定 spring.shell.config.location 來指定。此屬性可以包含一個佔位符 ({userconfig}),它解析為公共共享配置目錄。

執行 Spring Shell 應用程式以檢視示例應用程式如何使用這些選項。
© . This site is unofficial and not affiliated with VMware.