First, install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install cask (https://github.com/caskroom/homebrew-cask)
$ brew install caskroom/cask/brew-cask
and finally install Spring STS
$ brew cask install sts
Java must be installed too.