Spring Framework is really great when it comes to i18n. It applies different strategies to get user’s locale from request. In this post we’ll show how apply that!
Continue reading Spring Locale from Requestspring
How to make sure that Spring Framework artifacts have consistent versions in Maven? It turns out that its very easy to prevent library mismatch errors!
Continue reading Maven Spring dependenciesBeanCurrentlyInCreationException is thrown by Spring Framework when it meets circular reference while setting up application context. Here we show what is *it and how to fix it!
Continue reading Spring Circular Reference – BeanCurrentlyInCreationExceptionSpring field injection This is probably the most common form of Dependency Injection, because it reduces a lot of boilerplate code needed with setter or constructor injections.
Continue reading Spring Field InjectionSpring Setter Injection This form of Dependency Injection is used very often, especially for optional dependencies and reconfigurable beans. We’ll show how to use it using Spring annotations.
Continue reading Spring Setter InjectionSpring Constructor Injection This is one of the simplest and cleanest types of Dependency Injection in the Spring Framework. In this post we show how to use it with help of Spring annotations.
Continue reading Spring Constructor Injection
How to exclude classes/packages from Component Scan in Spring Framework? The task is a bit tricky, especially when regexp is involved. See how it works!
Continue reading Spring component scan excludeProblem: How to load properties file in Spring? In the following example we show how to use PropertySource class to load properties into Spring Application Context.
Continue reading Spring properties fileProblem: How to inject null value in Spring Framework? This can be easily done using Spring Expression Language as in the following example.
Continue reading Spring inject null valueProblem: How to find annotated classes using Spring and read metadata from them? Sometimes you may want to attach metadata to your classes using custom annotations. Here’s an example how you can leverage Spring‘s classpath scanning mechanism to do that.
Continue reading Spring find annotated classes