|
@@ -8,6 +8,7 @@ import org.springframework.messaging.handler.annotation.MessageMapping;
|
8
|
8
|
import org.springframework.messaging.handler.annotation.SendTo;
|
9
|
9
|
import org.springframework.web.bind.annotation.*;
|
10
|
10
|
|
|
11
|
+@CrossOrigin
|
11
|
12
|
@RestController
|
12
|
13
|
public class PostController {
|
13
|
14
|
|
|
@@ -29,7 +30,7 @@ public class PostController {
|
29
|
30
|
return postService.createPost(post);
|
30
|
31
|
}
|
31
|
32
|
|
32
|
|
- @CrossOrigin
|
|
33
|
+
|
33
|
34
|
@GetMapping("/posts/all")
|
34
|
35
|
public Iterable<Post> getAllPosts() {
|
35
|
36
|
return postService.getAllPosts();
|