So I'm trying to do something like this inside the Module class
@Inject(optional = true)
@Named("TotalQuantity")
private int totalQuantity = 5Is this the correct way to set the default value, if the dependency is not provided?
As far as I can understand, use @Autowired inside a Spring config but cannot use @Inject in a Guice Module file. Is this true? (JAVA) I want to use something like this inside the Module class |
|
|
Is this the correct way to set the default value, if the dependency is not provided? |