In Java configuration style

Spring configuration remade with XML in Java configuration style
Revert "In Java configuration style"

This reverts commit a274c156c51c0d3a42433bc3b0cde094aad14975.
Revert "Revert "In Java configuration style""

This reverts commit 6fbd4e126395b7f6b328de244d0d08c1bc0d9dfb.
In Java configuration style

Spring configuration remade with XML in Java configuration style