how to use static proxy and Dynamic proxy