@Bean public VelocityConfig velocityConfig() { Map<String, Object> velocityProperties = new HashMap<>(); velocityProperties.put("eventhandler.include.class", IncludeRelativePath.class.getName()); velocityProperties.put("input.encoding", "utf-8"); velocityProperties.put("output.encoding", "utf-8"); VelocityConfigurer cfg = new VelocityConfigurer(); cfg.setResourceLoaderPath("/WEB-INF/views/"); cfg.setVelocityPropertiesMap(velocityProperties); return cfg; }