Best practice for @Value fields, Lombok, and Constructor Injection?

You need @RequiredArgsConstructor and mark myDependency as final. In this case, Lombok will generate a constructor based on ‘required’ final filed as argument, for example: @RequiredArgsConstructor @Service public class MyService { @Value(“${my.config.value}”) private String myField; private final MyComponent myComponent; //… } That is equal the following: @Service public class MyService { @Value(“${my.config.value}”) private String myField; … Read more

Can I pass constructor parameters to Unity’s Resolve() method?

As of today they have added this functionality: It’s in the latest drop here: http://unity.codeplex.com/SourceControl/changeset/view/33899 Discussion on it here: http://unity.codeplex.com/Thread/View.aspx?ThreadId=66434 Example: container.Resolve<IFoo>(new ParameterOverrides<Foo> { { “name”, “bar” }, { “address”, 42 } });”