improve gradle script and add spring mvc support.