-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Closed as not planned
Copy link
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: feedback-providedFeedback has been providedFeedback has been provided
Description
Spring Data MongoDb 4.2.4
MongoDb Driver 4.11.1
I use the following code to query mongodb. Although it returns the correct result when querying, why does the underlying source code throw the exception Can't find a codec for CodecCacheKey{clazz=interface java.util.List, types=null}.org.bson.codecs.configuration.CodecConfigurationException
Although this exception is caught
interface AccountSettingsRepository : MongoRepository<AccountSettings, String> {
@Meta(maxExecutionTimeMs = 50)
@Query(fields = "{'blacklist': 1}")
fun findByAccountId(accountId: String): AccountSettings?
}
@Document(collection = "accounts")
data class AccountSettings(
@Id
val accountId: String,
@Value("#root.blacklist ?: {}")
val blacklist: List<String>
)
Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: feedback-providedFeedback has been providedFeedback has been provided