diff --git a/src/main/java/com/loafle/bridge/Application.java b/src/main/java/com/loafle/bridge/Application.java index 6f75650..306d20c 100644 --- a/src/main/java/com/loafle/bridge/Application.java +++ b/src/main/java/com/loafle/bridge/Application.java @@ -28,6 +28,7 @@ public class Application { public ServletRegistrationBean h2servletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet()); registration.addUrlMappings("/console/*"); + registration.addInitParameter("webAllowOthers", "true"); return registration; } diff --git a/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java b/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java deleted file mode 100644 index 6c5c25d..0000000 --- a/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.controller; - -/** - * Created by root on 16. 11. 15. - */ -public class DiscoveringController { -} diff --git a/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java b/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java deleted file mode 100644 index 57b08fc..0000000 --- a/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.entity; - -/** - * Created by root on 16. 11. 15. - */ -public class Discovering { -} diff --git a/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java b/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java deleted file mode 100644 index db003f9..0000000 --- a/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.repository; - -/** - * Created by root on 16. 11. 15. - */ -public class DiscoveringRepository { -} diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java b/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java new file mode 100644 index 0000000..e301c67 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java @@ -0,0 +1,7 @@ +package com.loafle.bridge.discoveryHistory.controller; + +/** + * Created by root on 16. 11. 15. + */ +public class DiscoveriyHistoryController { +} diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java b/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java new file mode 100644 index 0000000..11af482 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java @@ -0,0 +1,61 @@ +package com.loafle.bridge.discoveryHistory.entity; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 16. 11. 15. + */ +@Entity +public class DiscoveryHistory +{ + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + + @Column(name = "START_AT", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false) + private Date startAt; + @Column(name = "END_AT", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false) + private Date endAt; + + @Column(name="RESULT", nullable=false) + private Boolean result; + +// private null DiscoveryZone; + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public Date getStartAt() { + return startAt; + } + + public void setStartAt(Date startAt) { + this.startAt = startAt; + } + + public Date getEndAt() { + return endAt; + } + + public void setEndAt(Date endAt) { + this.endAt = endAt; + } + + public Boolean getResult() { + return result; + } + + public void setResult(Boolean result) { + this.result = result; + } + + +} \ No newline at end of file diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java b/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java new file mode 100644 index 0000000..e8822c1 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java @@ -0,0 +1,13 @@ +package com.loafle.bridge.discoveryHistory.repository; + +import com.loafle.bridge.discoveryHistory.entity.DiscoveryHistory; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +/** + * Created by root on 16. 11. 15. + */ +@RepositoryRestResource(collectionResourceRel = "discoveryHistory", path = "discoveryHistory") +public interface DiscoveryHistoryRepository extends JpaRepository { +}