LPS-48247 Comments API: modularize Spring configuration, circular reference affects functional tests

Hi @marcellustavares!

Please forward to @rotty3000 after your review if all is right. Thanks!