Configure Spring Boot for SPA frontend

前端 未结 3 738
谎友^
谎友^ 2020-12-10 19:21

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.

3条回答
  •  借酒劲吻你
    2020-12-10 19:42

    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.

提交回复
热议问题