Refactor to remove code duplication from ServerConfigurationBean.

Saw a comment flagging tech debt, so I fixed it.