move application.java to com.loafle.bridge
This commit is contained in:
parent
adfa6740fc
commit
897286b0fe
|
@ -1,4 +1,4 @@
|
||||||
package hello;
|
package com.loafle.bridge;
|
||||||
|
|
||||||
|
|
||||||
//import org.h2.server.web.WebServlet;
|
//import org.h2.server.web.WebServlet;
|
|
@ -1,7 +1,71 @@
|
||||||
package com.loafle.bridge.discoveryport.entity;
|
package com.loafle.bridge.discoveryport.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by root on 16. 11. 15.
|
* Created by root on 16. 11. 15.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Entity
|
||||||
public class DiscoveryPort {
|
public class DiscoveryPort {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
@Column(nullable = false)
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Column(nullable = false)
|
||||||
|
private short portNumber;
|
||||||
|
|
||||||
|
@Temporal(value = TemporalType.TIMESTAMP)
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
@Temporal(value = TemporalType.TIMESTAMP)
|
||||||
|
private Date updateDate;
|
||||||
|
|
||||||
|
public DiscoveryPort() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public short getPortNumber() {
|
||||||
|
return portNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPortNumber(short portNumber) {
|
||||||
|
this.portNumber = portNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateDate() {
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateDate(Date updateDate) {
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.loafle.bridge.discoveryport.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by root on 16. 11. 15.
|
||||||
|
*/
|
||||||
|
public class ServiceScanHistory {
|
||||||
|
}
|
|
@ -1,7 +1,13 @@
|
||||||
package com.loafle.bridge.discoveryport.repository;
|
package com.loafle.bridge.discoveryport.repository;
|
||||||
|
|
||||||
|
import com.loafle.bridge.discoveryport.entity.DiscoveryPort;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by root on 16. 11. 15.
|
* Created by root on 16. 11. 15.
|
||||||
*/
|
*/
|
||||||
public class DiscoveryPortRepository {
|
|
||||||
|
@RepositoryRestResource(collectionResourceRel = "discoveryPort", path = "discoveryPort")
|
||||||
|
public interface DiscoveryPortRepository extends JpaRepository<DiscoveryPort, Long>{
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package hello;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.loafle.bridge.Application;
|
||||||
import hello.entity.Member;
|
import hello.entity.Member;
|
||||||
import hello.repository.MemberRepository;
|
import hello.repository.MemberRepository;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
@ -30,7 +31,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = hello.Application.class)
|
@ContextConfiguration(classes = Application.class)
|
||||||
@WebIntegrationTest
|
@WebIntegrationTest
|
||||||
public class HelloControllerTest {
|
public class HelloControllerTest {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package hello.repository;
|
package hello.repository;
|
||||||
|
|
||||||
import hello.Application;
|
import com.loafle.bridge.Application;
|
||||||
import hello.entity.Member;
|
import hello.entity.Member;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user