fixed
ignorejson
This commit is contained in:
parent
cd5464a5cf
commit
14cdf606cd
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryhost;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryport.DiscoveryPort;
|
||||
import com.loafle.bridge.discoveryzone.DiscoveryZone;
|
||||
|
||||
|
@ -25,6 +26,7 @@ public class DiscoveryHost {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "ZONE_ID", nullable = false)
|
||||
@JsonIgnore
|
||||
private DiscoveryZone zone;
|
||||
|
||||
public DiscoveryZone getZone() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryhost;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryport.type.DirectionType;
|
||||
import com.loafle.bridge.discoveryport.type.PortType;
|
||||
|
||||
|
@ -18,6 +19,7 @@ public class PortScanHistory {
|
|||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn
|
||||
@JsonIgnore
|
||||
private DiscoveryHost host;
|
||||
|
||||
public DiscoveryHost getHost() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryport;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryhost.DiscoveryHost;
|
||||
import com.loafle.bridge.discoveryport.type.PortType;
|
||||
import com.loafle.bridge.discoveryservice.DiscoveryService;
|
||||
|
@ -17,6 +18,7 @@ public class DiscoveryPort {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn
|
||||
@JsonIgnore
|
||||
private DiscoveryHost host;
|
||||
public DiscoveryHost getHost() {
|
||||
return host;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryport;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryport.type.DirectionType;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
@ -22,6 +23,7 @@ public class ServiceScanHistory {
|
|||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn
|
||||
@JsonIgnore
|
||||
private DiscoveryPort port;
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryservice;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryport.DiscoveryPort;
|
||||
import com.loafle.bridge.discoveryport.type.PortType;
|
||||
|
||||
|
@ -17,6 +18,7 @@ public class DiscoveryService {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(nullable = false)
|
||||
@JsonIgnore
|
||||
private DiscoveryPort port;
|
||||
public DiscoveryPort getPort() {
|
||||
return port;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.loafle.bridge.discoveryzone;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.loafle.bridge.discoveryhistory.DiscoveryHistory;
|
||||
import com.loafle.bridge.discoveryhost.DiscoveryHost;
|
||||
|
||||
|
@ -25,6 +26,7 @@ public class DiscoveryZone {
|
|||
|
||||
@JoinColumn
|
||||
@OneToOne
|
||||
@JsonIgnore
|
||||
private DiscoveryHistory discovery;
|
||||
|
||||
@OneToMany(mappedBy = "zone", cascade = CascadeType.ALL)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package com.loafle.bridge.discoveryzone;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -33,8 +36,9 @@ public class HostScanHistory {
|
|||
@Column
|
||||
private String description;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn
|
||||
@JsonIgnore
|
||||
private DiscoveryZone zone;
|
||||
|
||||
public long getId() {
|
||||
|
|
|
@ -10,7 +10,7 @@ spring.datasource.driver-class-name=org.h2.Driver
|
|||
|
||||
## Hibernate configuration
|
||||
spring.jpa.database=h2
|
||||
spring.jpa.hibernate.ddl-auto=create-drop
|
||||
spring.jpa.hibernate.ddl-auto=create
|
||||
#spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
|
||||
spring.jpa.show-sql=true
|
Loading…
Reference in New Issue
Block a user