我已經寫了一個StartupListener通過實現ApplicationListener並重寫方法:onApplicationEvent(ContextRefreshedEvent event)。 @Component
public class StartupListener implements ApplicationListener<ContextRefreshedEvent> {
我有一個非常漫長(和凌亂)的crontab(在我的Mac上)。所以我開始通過引入變量來清理它。然後我意識到連接變量(就像在Bash腳本中)在我的crontab中不起作用。這是我有: SHELL=/bin/bash
HOME=/Users/leuchtturm
# [1] Previously had this, but this does not seem to work
# $HOME i