Hi, I am make the new service with lagom 1.6, but I have one problem, the values is in hardcode, example:
@Override
public RetentionCriteria retentionCriteria() {
return RetentionCriteria.snapshotEvery(100, 2);
}
the 100 and 2 is in hardcode, but the constructor no support many arguments, because the ShoppingServiceImpl
only support one argument? this is correct?
@Inject
public ShoppingCartServiceImpl(ClusterSharding clusterSharing,
PersistentEntityRegistry persistentEntityRegistry,
ReportRepository reportRepository) {
this.clusterSharing = clusterSharing;
this.persistentEntityRegistry = persistentEntityRegistry;
this.reportRepository = reportRepository;
// register entity on shard
this.clusterSharing.init(
Entity.of(
ShoppingCartEntity.ENTITY_TYPE_KEY,
ShoppingCartEntity::create
)
);
}
How do I inject these values from the application.conf?