org.springframework.data.solr.UncategorizedSolrException

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
for (TbItem tbItem : list) {
            if(tbItem.getSpec()!=null) {
                Map map = JSON.parseObject(tbItem.getSpec());
                tbItem.setSpecMap(map);
            }
        }
System.out.println("++++++++++++++++++");
solrTemplate.saveBeans(list);
solrTemplate.commit();
 
saveBeans 时报错,信息为空指针异常,下方显示通配符匹配错误,根本原因是getSpec()获取信息时,set给specMap()没有指定map的类型,导致无法匹配
 
 @Dynamic
    @Field("item_spec_*")
    private Map<String,String> specMap;

  

posted on   linuxSu  阅读(652)  评论(0编辑  收藏  举报

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示