[英]criteria query mongodb - spring boot - regex- pattern: start with
我有一個字符串變量value="System.Ram.*" ,它將用於獲取以 System.Ram 開頭的任何屬性(例如 System.Ram.dell、System.Ram.intel 等)
我想使用這樣的東西:
Criteria.where(property).regex(pattern_of_value)
誰能幫我這個? 謝謝你 !
Criteria.where(property).regex("^System.Ram");
或者在下面使用(這里的value
是“System.Ram”):
Criteria.where(property).regex("^" + value);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.