owner
owner copied to clipboard
How to globally set fully-qualified name
First of all: thx for this cool project! 🙏
AFAIK Owner defaults to the unqualified method name, i.e.:
package com.example;
import org.aeonbits.owner.Config;
public interface MyConfig extends Config {
String myProperty();
}
Can be used as:
myProperty=foo
Is there a way to globally let Owner use the fully-qualified name, i.e.:
com.example.myProperty=foo
Hi.
The mapping used at the moment is very straightforward as you have noticed. The class who implements that is PropertiesMapper.java
, and relies on @Key
annotation then - if missing - on method name.
Would be definitely nice to have a feature to replace the default behavior with a different class; but it's not there; sorry.
Have a look at the class, maybe you can implement it by yourself, it should not be very hard. Eventually open a pull request; I cannot guarantee I'll be fast to review and integrate that, since I'm not working actively on this project. So, be lenient with me in this case.
Regards, Luigi.
OK, thx for pointing to PropertiesMapper
. Will have a look at it.