-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package model.document; | ||
|
||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
|
||
/** | ||
* Created by guojing on 2017/4/2. | ||
*/ | ||
@Document(collection = "jedi") | ||
public class UserProps { | ||
@Id | ||
private Long id; | ||
|
||
private String content; | ||
|
||
public UserProps() { | ||
super(); | ||
} | ||
|
||
public UserProps(String content) { | ||
this.content = content; | ||
} | ||
|
||
public final Long getId() { return id; } | ||
|
||
public final void setId(final Long id) { this.id = id; } | ||
|
||
public final String getContent() { return content; } | ||
|
||
public final void setContent(final String content) { this.content = content; } | ||
|
||
@Override | ||
public String toString() { | ||
return String.format( | ||
"Todo[id=%s, content='%s']", | ||
id, content); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package repository; | ||
|
||
import model.document.UserProps; | ||
import org.springframework.data.mongodb.repository.MongoRepository; | ||
|
||
/** | ||
* Created by guojing on 2017/4/2. | ||
*/ | ||
public interface UserPropsRepository extends MongoRepository<UserProps, String> { | ||
UserProps findOne(String id); | ||
UserProps save(UserProps props); | ||
UserProps update(UserProps props); | ||
void delete(UserProps props); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters