Added logic for dynamic url detection originally from raibledesigns.com: http://raibledesigns.com/rd/entry/documenting_your_spring_api_with