Packages moving and test of security layer.

This commit is contained in:
Florian
2018-03-16 23:37:33 +01:00
parent c587ff09a8
commit 3f9f3d5ad1
25 changed files with 132 additions and 56 deletions
@@ -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();
}
}