由于每documentation它说运行date命令(“无法运行程序...系统找不到指定的文件”)
OsCommands - 此命令的关键字是感叹号,后感叹号 点可以在Unix /窗口命令字符串传递给被执行
这意味着,我们可以通过用!
(感叹号)前缀的OS命令执行在弹簧壳OS命令。
但我相信有一些问题或我错过了一些东西。当我尝试时,我得到了下面的错误。
hw-shell>! date
command is: date
Unable to execute command date [Cannot run program "date" (in directory "."): CreateProcess error=2, The system cannot find the file specified]
Jorg,谢谢你的回复。我运行了通常随分发而来的示例程序。 Spring ApplicationContext已经配置好了。仅当我在Windows中启动Spring Shell时才会执行OS命令。在Linux中,它工作正常。 – user3332626