I created an application and want to config its logging.Level thorugh bean
<bean id="loggingLevel" class="java.util.logging.Level"> <constructor-arg> <value>INFO</value> </constructor-arg> </bean>
but it failed. Here is the error message:
Unsatisfied dependency expressed through constructor argument with index 1 of type [int]: Ambiguous constructor argument types – did you specify the correct bean references as constructor arguments?
So how to do it the right way?
Instances of
java.util.logging.Levelare not intended to be instantiated this way, they should be obtained from static fields. In Spring you may use<util:constant>: