Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释 Java 中控制器类的含义和位置吗?为什么我们需要把 main 方法放在那里?
控制器类通常是模型视图控制器 (MVC) 模式的类部分。控制器基本上控制数据流。
它控制数据流入模型对象并在数据更改时更新视图。
我建议你阅读它: