forked from kiworkshop/community
-
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.
- Refactor Article, Tag domain - Add article.http
- Loading branch information
1 parent
bbfaa68
commit 2d8ed4f
Showing
5 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
content-api/src/main/java/community/content/simplelife/article.http
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,21 @@ | ||
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection) or | ||
# paste cURL into the file and request will be converted to HTTP Request format. | ||
# | ||
# Following HTTP Request Live Templates are available: | ||
# * 'gtrp' and 'gtr' create a GET request with or without query parameters; | ||
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body; | ||
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);import community.content.simplelife.article.domain.SimpleArticle; | ||
POST localhost:8080/simplelife/articles | ||
Content-Type: application/json | ||
|
||
{ | ||
"title": "title1", | ||
"description": "description1", | ||
"content": "content1", | ||
"simpleTags": ["tag1","tag2"] | ||
} | ||
|
||
### | ||
DELETE localhost:8080/simplelife/articles/1 | ||
|
||
### |
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
2 changes: 2 additions & 0 deletions
2
...nt-api/src/main/java/community/content/simplelife/article/domain/SimpleTagRepository.java
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package community.content.simplelife.article.domain; | ||
|
||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface SimpleTagRepository extends JpaRepository<SimpleTag, Long> { | ||
Optional<SimpleTag> findByName(String name); | ||
} |
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