This commit is contained in:
jackdaw 2016-11-15 16:01:29 +09:00
commit 25485fea7e
7 changed files with 82 additions and 21 deletions

View File

@ -28,6 +28,7 @@ public class Application {
public ServletRegistrationBean h2servletRegistration() { public ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet()); ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*"); registration.addUrlMappings("/console/*");
registration.addInitParameter("webAllowOthers", "true");
return registration; return registration;
} }

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.controller;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveringController {
}

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.entity;
/**
* Created by root on 16. 11. 15.
*/
public class Discovering {
}

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.repository;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveringRepository {
}

View File

@ -0,0 +1,7 @@
package com.loafle.bridge.discoveryHistory.controller;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveriyHistoryController {
}

View File

@ -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;
}
}

View File

@ -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<DiscoveryHistory,Long> {
}