We should be able to map this to a Duration attribute.
Exception thrown:
WARN com.netflix.governator.configuration.ArchaiusConfigurationProvider - Could not deserialize configuration with key foo to type class java.time.Duration
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('m' (code 109)): Expected space separating root-level values
at [Source: 300ms; line: 1, column: 5]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:437)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportMissingRootWS(ParserMinimalBase.java:453)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._verifyRootSpace(ReaderBasedJsonParser.java:1236)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._parsePosNumber(ReaderBasedJsonParser.java:886)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:680)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3090)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3036)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2146)
at com.netflix.governator.configuration.AbstractObjectConfigurationProvider$1.get(AbstractObjectConfigurationProvider.java:45)
at com.netflix.governator.configuration.Property$3.get(Property.java:28)
at com.netflix.governator.lifecycle.ConfigurationProcessor.assignConfiguration(ConfigurationProcessor.java:115)
at com.netflix.governator.lifecycle.DefaultConfigurationMapper.mapConfiguration(DefaultConfigurationMapper.java:45)
at com.netflix.governator.lifecycle.LifecycleManager.startInstance(LifecycleManager.java:333)
at com.netflix.governator.lifecycle.LifecycleManager.add(LifecycleManager.java:155)
at com.netflix.governator.guice.InternalLifecycleModule.processInjectedObject(InternalLifecycleModule.java:101)
at com.netflix.governator.guice.InternalLifecycleModule.access$000(InternalLifecycleModule.java:44)
at com.netflix.governator.guice.InternalLifecycleModule$2$1.afterInjection(InternalLifecycleModule.java:76)
at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:119)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:115)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at com.adobe.test.Main.main(Main.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Sample of
reference.conf
file:foo = 300ms
We should be able to map this to a
Duration
attribute.Exception thrown: