Add Config to the framework

refactor the code

Signed-off-by: Peterinor <tangyutianbulao@qq.com>