refactoring code, use Bean class for rest-api module