Java Programming Tutorials

Java programming tutorials with many code examples!

Maven Spring dependencies

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!

Read More

Share with the World!

Spring Circular Reference – BeanCurrentlyInCreationException

BeanCurrentlyInCreationException 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!

Read More

Share with the World!

Spring Field Injection

Spring 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.

Read More

Share with the World!

Spring Setter Injection

Spring 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.

Read More

Share with the World!

Spring find annotated classes

Problem:

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.

Read More

Share with the World!
Pages:12