Change the structure of routers, Extract BeanFactory