Combine Maven profile properties

I have fought with this problem a couple of times, but now I found a way out. Let's say you have a Maven POM and, depending on the active profiles, you want to set a property, like: You should know by now that using mvn package -Pdev,ci is not going to produce the outcome you … Continue reading Combine Maven profile properties

Advertisements

Spring and Helper classes

If you use helper classes and Spring injection it might happen you need to inject beans into static fields of your helper classes. In this case it can come handy a Spring class called org.springframework.beans.factory.config.MethodInvokingFactoryBean. Consider the following two classes where Static represents your helper class and NonStatic your injected bean: You can inject a … Continue reading Spring and Helper classes