how to configure module?

I’m using basic template,and create a module in @app/modules/ ,I want to use a different user component and a different errorHander.How to configure it?