org.springframework.data.solr.UncategorizedSolrException

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 2018-03-17 23:52  linuxSu  阅读(650)  评论(0编辑  收藏  举报

导航