Package io.quarkus.mongodb
Annotation Type MongoClientName
-
@Target({TYPE,METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @Documented @Qualifier public @interface MongoClientName
Marker annotation to select mongo connection of cluster configuration Use name parameter to select it For example, if a mongo connection is configured like so inapplication.properties
:quarkus.mongodb.cluster1.connection-string=mongodb://localhost:27018
Then to inject the properMongoClient
, you would need to useMongoClientName
like so:@Inject @MongoClientName("cluster1") MongoClient client;
-
-
Element Detail
-
value
String value
Specify the cluster name of the connection.- Returns:
- the value
- Default:
- ""
-
-