Examples of PostService


Examples of com.freewebsys.blog.service.PostService

    ApplicationContext applicationContext = WebApplicationContextUtils
        .getWebApplicationContext(request.getSession()
            .getServletContext());
    PostTypeService postTypeService = (PostTypeService) applicationContext
        .getBean("postTypeService");
    PostService postService = (PostService) applicationContext
        .getBean("postService");
    List<Post> postList = null;
    List<PostType> postTypeList = null;
    try {
      postList = postService.findAllPost();
      postTypeList = postTypeService.findAllPostType();
    } catch (Exception e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
View Full Code Here

Examples of sino.service.PostService

        System.out.println(postDao.retrieve(1).getPreview());
    }

    public void testB() throws Exception {
        ApplicationContext context = new ClassPathXmlApplicationContext("/config.xml");
        PostService postService = (PostService) context.getBean("postService");
        Post post = new Post();
        post.setContent("内容");
        post.setTitle("标题");
        post.setPreview("预览");
        post.setModificationDate(new Date());
        post.setCreationDate(new Date());
        post.setType(PostType.NEWS);
        postService.createPost(post);
        System.out.println(postService.getPost(post.getId()).getContent());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.