All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.xiao1wang.wordapp.config.PoiExtendConfig Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.github.xiao1wang.wordapp.config;

import com.deepoove.poi.config.Configure;
import com.deepoove.poi.config.ConfigureBuilder;
import com.github.xiao1wang.wordapp.renderpolicy.ChartRenderPolicy;
import com.github.xiao1wang.wordapp.renderpolicy.ListRenderPolicy;
import com.github.xiao1wang.wordapp.renderpolicy.TableRenderPolicy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 针对poi-tl提供的插件
 * @author wangyahui
 * @date 2020/3/20 15:20
 */
@Configuration
public class PoiExtendConfig {

    @Bean("poiExtendTagConfig")
    public Configure extendConfig() {
        ConfigureBuilder builder = Configure.newBuilder();
        // 定义word文档中使用的标签类型对应的插件
        builder.addPlugin('&', new ChartRenderPolicy());
        builder.addPlugin('%', new ListRenderPolicy());
        builder.addPlugin('$', new TableRenderPolicy());
        return builder.build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy