Archived
Packages moving and test of security layer.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package org.codiki.posts;
|
||||
|
||||
import org.codiki.core.entities.persistence.Post;
|
||||
import org.codiki.core.repositories.PostRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/posts")
|
||||
public class PostController {
|
||||
|
||||
@Autowired
|
||||
private PostRepository postRepository;
|
||||
|
||||
@GetMapping
|
||||
public Iterable<Post> getAll() {
|
||||
return postRepository.findAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user