Updated indentation
This commit is contained in:
parent
1d1791c90d
commit
31a9e429f1
@ -16,7 +16,6 @@ public class ArticleApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ArticleApplication.class, args);
|
SpringApplication.run(ArticleApplication.class, args);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -16,7 +16,7 @@ public class ArticlesController {
|
|||||||
private ArticleService articleService;
|
private ArticleService articleService;
|
||||||
|
|
||||||
@GetMapping("")
|
@GetMapping("")
|
||||||
public List<Article> getAllArticles(){
|
public List<Article> getAllArticles() {
|
||||||
return articleService.getAllArticles();
|
return articleService.getAllArticles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class Article {
|
|||||||
//@JsonIgnore
|
//@JsonIgnore
|
||||||
//@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
//@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||||
//@ApiModelProperty(hidden = true)
|
//@ApiModelProperty(hidden = true)
|
||||||
@ApiParam(hidden = true)
|
//@ApiParam(hidden = true)
|
||||||
//@ApiModelProperty(readOnly = true)
|
//@ApiModelProperty(readOnly = true)
|
||||||
private int id;
|
private int id;
|
||||||
private String title;
|
private String title;
|
||||||
|
@ -12,12 +12,12 @@ public class ArticleService {
|
|||||||
|
|
||||||
private List<Article> articles = new ArrayList<>();
|
private List<Article> articles = new ArrayList<>();
|
||||||
|
|
||||||
public List<Article> getAllArticles(){
|
public List<Article> getAllArticles() {
|
||||||
return articles;
|
return articles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addArticle(Article article) {
|
public void addArticle(Article article) {
|
||||||
article.setId(articles.size()+1);
|
article.setId(articles.size() + 1);
|
||||||
articles.add(article);
|
articles.add(article);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user