![]() | 1 qinxi 2018-12-13 12:01:33 +08:00 ![]() @Document(collection = "#{T(demo.TenantGenerator).tenant()}Employee") 搜索关键字: spring data mongo dynamic collection name |
![]() | 2 qinxi 2018-12-13 12:02:56 +08:00 |
3 jasonailu 2018-12-13 12:38:38 +08:00 ![]() 利用 MongoTemplate: List<Entity> entities = mongoTemplate.find(Query.query(new Criteria()), Entity.class, "entityName"); find 第三个条件可以输入文档名字。 |
6 xiaolongyuan 2018-12-13 15:14:02 +08:0 |
![]() | 7 qinxi 2018-12-13 15:20:28 +08:00 @xiaolongyuan #6 如果想用 NameQuery 偷个懒的话 就只能用 spel |