Examples of OptionService


Examples of com.freewebsys.blog.service.OptionService

    ApplicationContext applicationContext = WebApplicationContextUtils
        .getWebApplicationContext(config.getServletContext());
    PostTypeService postTypeService = (PostTypeService) applicationContext
        .getBean("postTypeService");
   
    OptionService optionService = (OptionService) applicationContext
        .getBean("optionService");
    try {
      PostType postType = postTypeService.findHomePostType();
      if (postType == null) {
        postType = new PostType();
        postType.setName("首页");
        postType.setIsHome(1);
        // 设置排序号
        postType.setOrderId(new Date().getTime());
        // 保存
        postTypeService.savePostType(postType);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    try {
      optionService.updateGlobalConf();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
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.