Spring ConversionService adding Converters

后端 未结 9 722
别那么骄傲
别那么骄傲 2020-12-31 03:47

I searched for the below problem, but couldn\'t find an answer.

I want to use spring\'s conversion service by writing my custom converter that implements org.spri

9条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 04:42

    write a custom conversionService

    public class CustomerConversionServiceFactoryBean extends ConversionServiceFactoryBean {
    
        List> converters = new ArrayList<>();
    
        public CustomerConversionServiceFactoryBean() {
            super();
    
        DefaultConversionService conversionservice = (DefaultConversionService)  super.getObject();
    
            for(int i=0;i

    then change your xml

    
        
            
                
            
        
    
    

    I think this will help you...

提交回复
热议问题