package com.xcong.farmer.cms.configurations; import com.xcong.farmer.cms.core.template.TemplateConfiguration; import com.xcong.farmer.cms.core.template.TemplateLoader; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * @author wzy * @date 2022-07-03 **/ @Slf4j @Configuration public class CmsConfig { @Bean public TemplateConfiguration templateConfiguration() { log.info("CMS管理系统"); TemplateConfiguration cfg = new TemplateConfiguration("/Users/helius/Desktop/template", "", "/Users/helius/Desktop/web/output"); TemplateLoader loader = new TemplateLoader(cfg); cfg.templateLoader(loader); return cfg; } }