Spring Batch - MongoDB to XML - Caused by: java.lang.IllegalStateException: A type to convert the input into is required

后端 未结 2 1226
醉酒成梦
醉酒成梦 2021-01-24 18:35

I am developing Spring Batch - MongoDB to XML example. In this example, when I run the main method I see the below error is cominng. Please guide on the below error

2条回答
  •  离开以前
    2021-01-24 19:38

    As the error points out, you need to set the "type" property on your "mongodbItemReader" bean.

    See MongoItemReader javadoc.

    Example:

    
        
        
        
    
    

    You might need to specify the package name in the value (I haven't tried it).

提交回复
热议问题