With the continuous development and evolvement of Internet of Things (IoT), monolithic application becomes much larger in scale and even more complex in structure. This leads to poor scalability, extensibility and maintainability. In response to those challenges, microservice architecture has been introduced in the field of IoT application, due to its flexibility, lightweight and loose coupling. However, the existing IoT framework of microservice mainly focus on a specific domain, therefore, this greatly limits its application. In this paper, we propose a general microservice system framework for the IoT application, which is a better scalable, extendable and maintainable architecture. We introduce its system design and related microservices, and emphasize on core service and device communication from service layer to physical layer. It has better capacity to support interoperability and accommodate heterogeneous objects. In addition, this framework can easily achieve more application integration such as automation, intelligence, Geo service and Big Data.