org.zodiac.autoconfigure.template.velocity.view.ReactiveVelocityViewConfiguration Maven / Gradle / Ivy
//package org.zodiac.autoconfigure.template.velocity.view;
//
//import java.io.IOException;
//
//import org.springframework.beans.factory.ObjectProvider;
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
//import org.springframework.context.annotation.Bean;
//import org.zodiac.autoconfigure.template.velocity.condition.ConditionalOnVelocityTemplateEnabled;
//
//@SpringBootConfiguration
//@ConditionalOnVelocityTemplateEnabled
//@ConditionalOnWebApplication(type = Type.REACTIVE)
//@ConditionalOnClass(value = {org.springframework.web.reactive.DispatcherHandler.class})
//@ConditionalOnProperty(name = org.zodiac.template.velocity.constants.VelocityTemplateSystemPropertiesConstants.SPRING_TEMPLATE_VELOCITY_VIEW_ENABLED, havingValue = "true")
//class ReactiveVelocityViewConfiguration extends AbstractVelocityViewConfiguration {
//
// public ReactiveVelocityViewConfiguration() {
// }
//
// @Bean
// @ConditionalOnMissingBean(org.zodiac.template.velocity.spring.view.VelocityConfig.class)
// protected org.zodiac.template.velocity.spring.view.VelocityConfigurer velocityConfigurer(VelocityTemplateViewProperties properties,
// ObjectProvider velocityTemplateEngineProvider) {
// org.zodiac.template.velocity.VelocityTemplateEngine velocityTemplateEngine = velocityTemplateEngineProvider.getIfAvailable();
// org.zodiac.template.velocity.spring.view.VelocityConfigurer configurer =
// new org.zodiac.template.velocity.spring.view.reactive.ReactiveVelocityConfigurer();
// configurer.setVelocityEngine(velocityTemplateEngine.getVelocityEngine());
// applyProperties(configurer, properties);
// return configurer;
// }
//
// @Bean
// @ConditionalOnMissingBean
// protected org.apache.velocity.app.VelocityEngine
// velocityEngine(org.zodiac.template.velocity.spring.view.VelocityConfigurer configurer)
// throws org.apache.velocity.exception.VelocityException, IOException {
// return configurer.getVelocityEngine();
// }
//
// @Bean
// @ConditionalOnMissingBean(name = org.zodiac.template.velocity.constants.VelocityTemplateConstants.VELOCITY_VIEW_RESOLVER_BEAN_NAME)
// //@ConditionalOnProperty(name = org.zodiac.template.velocity.constants.TemplateVelocitySystemPropertiesConstants.SPRING_TEMPLATE_VELOCITY_VIEW_ENABLED, havingValue = "true")
// protected org.zodiac.template.velocity.spring.view.reactive.ReactiveVelocityViewResolver velocityViewResolver(VelocityTemplateViewProperties properties) {
// org.zodiac.template.velocity.spring.view.reactive.ReactiveVelocityViewResolver resolver =
// new org.zodiac.template.velocity.spring.view.reactive.ReactiveVelocityViewResolver();
// properties.applyToMvcViewResolver(resolver);
// return resolver;
// }
//
//}