diff --git a/src/main/java/com/example/manager/controller/Address.java b/src/main/java/com/example/manager/controller/Address.java index 0978949..74bbf28 100644 --- a/src/main/java/com/example/manager/controller/Address.java +++ b/src/main/java/com/example/manager/controller/Address.java @@ -14,7 +14,7 @@ import javax.validation.Valid; @RestController -@RequestMapping(value = UrlMapper.globalUrl + UrlMapper.addressUrl) +@RequestMapping(value = UrlMapper.GLOBAL_URL + UrlMapper.ADDRESS_URL) public class Address { @Autowired diff --git a/src/main/java/com/example/manager/controller/Person.java b/src/main/java/com/example/manager/controller/Person.java index 4afbd85..a1b8784 100644 --- a/src/main/java/com/example/manager/controller/Person.java +++ b/src/main/java/com/example/manager/controller/Person.java @@ -19,7 +19,7 @@ import io.swagger.annotations.ApiResponse; @RestController -@RequestMapping(value = UrlMapper.globalUrl + UrlMapper.dataUrl) +@RequestMapping(value = UrlMapper.GLOBAL_URL + UrlMapper.DATA_URL) public class Person { @Autowired diff --git a/src/main/java/com/example/manager/data/Person.java b/src/main/java/com/example/manager/data/Person.java index 6b0f24b..c597872 100644 --- a/src/main/java/com/example/manager/data/Person.java +++ b/src/main/java/com/example/manager/data/Person.java @@ -67,15 +67,15 @@ public Person(Long id, @NotBlank(message = "First Name can not be empty") String private Set
address; @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "project_id", referencedColumnName = "id") + @JoinColumn(name = "person_id", referencedColumnName = "id") private Set project; @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "education_id", referencedColumnName = "id") + @JoinColumn(name = "person_id", referencedColumnName = "id") private Set education; @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "experience_id", referencedColumnName = "id") + @JoinColumn(name = "person_id", referencedColumnName = "id") private Set experience; } diff --git a/src/main/java/com/example/manager/mapping/UrlMapper.java b/src/main/java/com/example/manager/mapping/UrlMapper.java index a49c763..8b1559a 100644 --- a/src/main/java/com/example/manager/mapping/UrlMapper.java +++ b/src/main/java/com/example/manager/mapping/UrlMapper.java @@ -1,8 +1,8 @@ package com.example.manager.mapping; public class UrlMapper { - public final static String globalUrl = "/api/v1/manage/"; - public final static String dataUrl = "data"; - public final static String addressUrl = "address"; + public final static String GLOBAL_URL = "/api/v1/manage/"; + public final static String DATA_URL = "data"; + public final static String ADDRESS_URL = "address"; } diff --git a/src/test/java/com/example/manager/controller/AddressTest.java b/src/test/java/com/example/manager/controller/AddressTest.java index 4196cca..43b774a 100644 --- a/src/test/java/com/example/manager/controller/AddressTest.java +++ b/src/test/java/com/example/manager/controller/AddressTest.java @@ -53,7 +53,7 @@ public class AddressTest { @Autowired ResponseFormat response; - String uri = UrlMapper.globalUrl + UrlMapper.addressUrl; + String uri = UrlMapper.GLOBAL_URL + UrlMapper.ADDRESS_URL; @Test void testGetAllAddress() throws Exception { diff --git a/src/test/java/com/example/manager/controller/PersonTest.java b/src/test/java/com/example/manager/controller/PersonTest.java index 04e7167..53486b7 100644 --- a/src/test/java/com/example/manager/controller/PersonTest.java +++ b/src/test/java/com/example/manager/controller/PersonTest.java @@ -52,7 +52,7 @@ public class PersonTest { @Autowired ResponseFormat response; - String uri = UrlMapper.globalUrl + UrlMapper.dataUrl; + String uri = UrlMapper.GLOBAL_URL + UrlMapper.DATA_URL; @Test void testGetAllData() throws Exception{