Как подключить vue.js к Api Spring Boot rest на Heroku? - PullRequest
0 голосов
/ 16 апреля 2019

Я думаю, я нашел, где проблема существует ... Я думаю, что на пути к домену на Heroku .. Вот так выглядят мои пути на маршрутах и ​​они указывают на мой бэкэнд, возможно, мне нужно изменить путь, поэтому он должен указывать на домен в Heroku, а не на Back-end

routes: [{
      path: "/about",
      component: _ceb3842a,
      name: "about"
    }, {
      path: "/creators",
      component: _c2b5ce4e,
      name: "creators"
    }, {
      path: "/deigmata",
      component: _c8455660,
      name: "deigmata"
    }, {
      path: "/files",
      component: _64a109e6,
      name: "files"
    }, {
      path: "/pictures",
      component: _41f4775b,
      name: "pictures"
    }, {
      path: "/prwtokola",
      component: _8f0c010a,
      name: "prwtokola"
    }, {
      path: "/prwtokola/new",
      component: _10c50cee,
      name: "prwtokola-new"
    }, {
      path: "/thhlastika/ct-eidh",
      component: _07c7c315,
      name: "thhlastika-ct-eidh"
    }, {
      path: "/thhlastika/ct-press-threats",
      component: _8b27d4f0,
      name: "thhlastika-ct-press-threats"
    }, {
      path: "/thhlastika/deigma-thhlastikwn",
      component: _21305152,
      name: "thhlastika-deigma-thhlastikwn"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh",
      component: _6511de78,
      name: "thhlastika-deigma-thhlastikwn-x-eidh"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats",
      component: _3091ccf6,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats"
    }, {
      path: "/thhlastika/ct-eidh/new",
      component: _1edb5ba3,
      name: "thhlastika-ct-eidh-new"
    }, {
      path: "/thhlastika/ct-press-threats/new",
      component: _3b47aed6,
      name: "thhlastika-ct-press-threats-new"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh/new",
      component: _1caa1874,
      name: "thhlastika-deigma-thhlastikwn-x-eidh-new"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats/new",
      component: _228d8e13,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats-new"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/map",
      component: _688012dc,
      name: "thhlastika-deigma-thhlastikwn-map"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/new",
      component: _b6c755c0,
      name: "thhlastika-deigma-thhlastikwn-new"
    }, {
      path: "/thhlastika/ct-eidh/dynamic-search/page/:number?",
      component: _7c40b6fc,
      name: "thhlastika-ct-eidh-dynamic-search-page-number"
    }, {
      path: "/thhlastika/ct-eidh/search/page/:number?",
      component: _132c8c2e,
      name: "thhlastika-ct-eidh-search-page-number"
    }, {
      path: "/thhlastika/ct-press-threats/dynamic-search/page/:number",
      component: _173ed629,
      name: "thhlastika-ct-press-threats-dynamic-search-page-number"
    }, {
      path: "/thhlastika/ct-press-threats/search/page/:number",
      component: _5c7f285b,
      name: "thhlastika-ct-press-threats-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh/dynamic-search/page/:number?",
      component: _91c8218e,
      name: "thhlastika-deigma-thhlastikwn-x-eidh-dynamic-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh/search/page/:number?",
      component: _014e516b,
      name: "thhlastika-deigma-thhlastikwn-x-eidh-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats/dynamic-search/page/:number?",
      component: _2902928c,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats-dynamic-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats/search/page/:number?",
      component: _7d0af7be,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/dynamic-search/page/:number?",
      component: _6cc5a11f,
      name: "thhlastika-deigma-thhlastikwn-dynamic-search-page-number"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/search/page/:number?",
      component: _63396d5e,
      name: "thhlastika-deigma-thhlastikwn-search-page-number"
    }, {
      path: "/deigmata/dynamic-search/page/:number?",
      component: _74f7ade1,
      name: "deigmata-dynamic-search-page-number"
    }, {
      path: "/deigmata/search/page/:number?",
      component: _a2f18fda,
      name: "deigmata-search-page-number"
    }, {
      path: "/files/search/page/:number?",
      component: _4fed4594,
      name: "files-search-page-number"
    }, {
      path: "/pictures/search/page/:number?",
      component: _28626928,
      name: "pictures-search-page-number"
    }, {
      path: "/prwtokola/search/page/:number?",
      component: _ff5485f0,
      name: "prwtokola-search-page-number"
    }, {
      path: "/thhlastika/ct-eidh/:id?",
      component: _bb6fa1b6,
      name: "thhlastika-ct-eidh-id"
    }, {
      path: "/thhlastika/ct-press-threats/:id?",
      component: _b07726dc,
      name: "thhlastika-ct-press-threats-id"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh/:id?",
      component: _81f28cbc,
      name: "thhlastika-deigma-thhlastikwn-x-eidh-id"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats/:id?",
      component: _40c54296,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats-id"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?",
      component: _3bc001f0,
      name: "thhlastika-deigma-thhlastikwn-id"
    }, {
      path: "/thhlastika/ct-eidh/:id?/edit",
      component: _6d6208f2,
      name: "thhlastika-ct-eidh-id-edit"
    }, {
      path: "/thhlastika/ct-press-threats/:id?/edit",
      component: _13cedc7a,
      name: "thhlastika-ct-press-threats-id-edit"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-eidh/:id?/edit",
      component: _18f2a52c,
      name: "thhlastika-deigma-thhlastikwn-x-eidh-id-edit"
    }, {
      path: "/thhlastika/deigma-thhlastikwn-x-press-threats/:id?/edit",
      component: _4864cc12,
      name: "thhlastika-deigma-thhlastikwn-x-press-threats-id-edit"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?/edit",
      component: _79c7b978,
      name: "thhlastika-deigma-thhlastikwn-id-edit"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?/files",
      component: _5c8641b5,
      name: "thhlastika-deigma-thhlastikwn-id-files"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?/pictures",
      component: _d4a7609a,
      name: "thhlastika-deigma-thhlastikwn-id-pictures"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?/x-eidh",
      component: _310865ea,
      name: "thhlastika-deigma-thhlastikwn-id-x-eidh"
    }, {
      path: "/thhlastika/deigma-thhlastikwn/:id?/x-press-threats",
      component: _ce763f5c,
      name: "thhlastika-deigma-thhlastikwn-id-x-press-threats"
    }, {
      path: "/deigmata/:id",
      component: _011f7a4a,
      name: "deigmata-id"
    }, {
      path: "/prwtokola/:id",
      component: _bcac7b02,
      name: "prwtokola-id"
    }, {
      path: "/deigmata/:id/edit",
      component: _507f37c2,
      name: "deigmata-id-edit"
    }, {
      path: "/prwtokola/:id/edit",
      component: _242094ed,
      name: "prwtokola-id-edit"
    }, {
      path: "/",
      component: _8f43cea0,
      name: "index"
    }],

    fallback: false
  })
}

А вот так выглядит один из моих доменов в моем бэкэнде

package com.teicm.kerkinibackend.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

@Entity
public class Prwtokola {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "prwtokola")
    @JsonIgnore
    private Set<Deigmata> deigmataSet = new HashSet<>();

    @Column(name = "perigrafh")
    private String perigrafh;

    @Column(name = "pinakas_dedomenwn")
    private String pinakasDedomenwn;

    @Column(name = "parathuro_dedomenwn")
    private String parathuroDedomenwn;

    public void addDeigma(Deigmata deigmata){
        deigmata.setPrwtokola(this);
        this.deigmataSet.add(deigmata);
    }

    public void removeDeigma(Deigmata deigmata){
        deigmata.setPrwtokola(null);
        this.deigmataSet.remove(deigmata);
    }

    public Prwtokola() {
    }

    public Prwtokola(Set<Deigmata> deigmataSet, String perigrafh, String pinakasDedomenwn, String parathuroDedomenwn) {
        this.deigmataSet = deigmataSet;
        this.perigrafh = perigrafh;
        this.pinakasDedomenwn = pinakasDedomenwn;
        this.parathuroDedomenwn = parathuroDedomenwn;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Set<Deigmata> getDeigmataSet() {
        return deigmataSet;
    }

    public void setDeigmataSet(Set<Deigmata> deigmataSet) {
        this.deigmataSet = deigmataSet;
    }

    public String getPerigrafh() {
        return perigrafh;
    }

    public void setPerigrafh(String perigrafh) {
        this.perigrafh = perigrafh;
    }

    public String getPinakasDedomenwn() {
        return pinakasDedomenwn;
    }

    public void setPinakasDedomenwn(String pinakasDedomenwn) {
        this.pinakasDedomenwn = pinakasDedomenwn;
    }

    public String getParathuroDedomenwn() {
        return parathuroDedomenwn;
    }

    public void setParathuroDedomenwn(String parathuroDedomenwn) {
        this.parathuroDedomenwn = parathuroDedomenwn;
    }
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...