What is the recommended way to create an ExchangeRateProvider in JavaMoney (JSR 354)?

1.1k Views Asked by At

We have started using the new 1.0 version of JavaMoney API with the reference implementation. Since we have specific Exchangerates that should be used, we need to implement our own ExchangeRateProvider. We have created a class MyRateProvider that extends org.javamoney.moneta.spi.AbstractRateProvider and added MyRateProvider-name to the file META-INF/services/javax.money.convert.ExchangeRateProvider. It works, but all the other providers in org.javamoney.moneta are also loaded even if we are not going to use them. Is there a way to avoid that?

1

There are 1 best solutions below

0
On

We have an issue today, currently we're looking for modules on moneta. That we did on this PR: https://github.com/JavaMoney/jsr354-ri/pull/135

That will be fixed on 1.2 version.