我正在尝试使用Spring Data Neo4j,Spring Data Rest和Spring Security 使用Spring Boot(版本1.4.0.M2)创建REST API .域由三种类型的实体组成:
@NodeEntity
public class User extends Entity {
@Relationship(type = "OWNS")
private Set<Activity> activities;
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private String password;
private String username;
}
Run Code Online (Sandbox Code Playgroud)
@NodeEntity
public class Activity extends Entity {
private String name;
@Relationship(type = "ON", direction = Relationship.INCOMING)
private Set<Period> periods;
@Relationship(type = "HAS", direction = Relationship.INCOMING)
private User user;
}
Run Code Online (Sandbox Code Playgroud)
@NodeEntity
public class Period extends Entity {
@Relationship(type = "HAS")
private Set<Activity> activities; …Run Code Online (Sandbox Code Playgroud)