Generate AngularJs factories and resources from Spring controllers