I have application where whole frontend part is laying in resource. I would like to separate things apart. And have separate server for UI, provided by gulp, for example. >
If you are using Angular with Spring Data Rest, I think that the most straightforward way to do it is using angular hash location strategy.
Just putting this in the providers array in your app module:
{ provide: LocationStrategy, useClass: HashLocationStrategy }
and, obviously, import it.