[mongodb] Fix missing service pid (#16568)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2024-03-27 21:03:09 +01:00 committed by GitHub
parent a4ee09a519
commit 95434d8a58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,7 @@ import org.openhab.core.persistence.strategy.PersistenceStrategy;
import org.openhab.core.types.State; import org.openhab.core.types.State;
import org.openhab.core.types.UnDefType; import org.openhab.core.types.UnDefType;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.ConfigurationPolicy; import org.osgi.service.component.annotations.ConfigurationPolicy;
@ -65,7 +66,8 @@ import com.mongodb.client.result.DeleteResult;
*/ */
@NonNullByDefault @NonNullByDefault
@Component(service = { PersistenceService.class, QueryablePersistenceService.class, @Component(service = { PersistenceService.class, QueryablePersistenceService.class,
ModifiablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE) ModifiablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE, property = Constants.SERVICE_PID
+ "=org.openhab.mongodb")
public class MongoDBPersistenceService implements ModifiablePersistenceService { public class MongoDBPersistenceService implements ModifiablePersistenceService {
private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class); private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class);