//package cn.iocoder.yudao.framework.velocity.config;
//
//import org.apache.velocity.app.Velocity;
//import org.apache.velocity.app.VelocityEngine;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.Properties;
//
//
//@Configuration
//public class VelocityConfig {
//
//
//    /**
//     * velocity 配置 * @return
//     */
//
//    @Bean
//
//    public VelocityConfig velocityConfig() {
//        VelocityEngine config = new VelocityEngine();
//
//        config.setProperty( VelocityEngine.FILE_RESOURCE_LOADER_PATH,"/templates/");
//        config("output.encoding", "UTF-8");
//        config.put("input.encoding", "UTF-8");
//        config.setVelocityProperties(velocityProperties);
//        return config;
//    }
//
//    /**
//     * 配置视图解析器 * @return
//     */
//    public VelocityLayoutViewResolver viewResolver() {
//
//        VelocityLayoutViewResolver viewResolver = new VelocityLayoutViewResolver(); //配置的是项目编译之后,视图所在的路径
//        viewResolver.setPrefix("/templates/");
//        viewResolver.setSuffix(".vm");
//        viewResolver.setViewClass(VelocityLayoutView.class);
//        viewResolver.setLayoutUrl("/templates/layout/layout.vm");
//        viewResolver.setContentType("text/html;charset=UTF-8");
//        viewResolver.setToolboxConfigLocation("/WEB-INF/classes/config/toolbox.xml");
//        return viewResolver;
//    }
//
//}
