Refactor to remove code duplication from ServerConfigurationBean.

Saw a comment flagging tech debt, so I fixed it.
I have added a fix in https://github.com/zanata/zanata-server/pull/559