refactor router.register and component.discover part in uaa.

refactor router.register and component.discover part in uaa.