Cannot generate an ID of type java.lang.Integer for the entity.
发布时间
阅读量:
阅读量
在向MongoDB中直接插入实体对象时,系统提示无法为该实体自动生成类型为java.lang.Integer的ID。
org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.lang.Integer for entity of type com.zsf.spider.model.Article!
at org.springframework.data.mongodb.core.EntityOperations$MappedEntity.assertUpdateableIdIfNotSet(EntityOperations.java:537)
at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:1238)
at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:1178)
at com.zsf.spider.SpiderArticle.start(SpiderArt
全部评论 (0)
还没有任何评论哟~
