Package halfpipe.example.model

Examples of halfpipe.example.model.Post


    }*/

    @POST
    @ApiOperation(value = "create", notes = "create a post", response = Post.class)
    public Post create(@Valid Post post) {
        Post save = posts.save(post);
        return save;
    }
View Full Code Here



    @GET
    @Path("/test")
    public Post testPost() {
        Post post = new Post();
        post.setAuthor("myauthor");
        post.setBody("mybody");
        post.setId(1L);
        post.setTitle("mytitle");
        return post;
    }
View Full Code Here

    Supplier<List<Post>> postsAsyncFallback() {
        return () -> Lists.newArrayList(getPost());
    }

    private Post getPost() {
        Post post = new Post();
        post.setId(-1L);
        post.setTitle("This is a fallback post for ");
        post.setAuthor("System");
        post.setBody("Hystrix caught an error, this is the fallback");
        return post;
    }
View Full Code Here

TOP

Related Classes of halfpipe.example.model.Post

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.