• 1 单一职责原则 xff08 Single Responsibility Principle xff09 一个类或一个接口只有一个职责 xff0c 有且仅有一个原因引起变化 2 开闭原则 xff08 Open Closed Principl