9

我想知道是否Spring MVC可以用来在Java Swing应用程序中实现 MVC 模式。我做了一些研究,发现 Spring MVC 可用于 Web 开发。

有什么方法可以将 Spring MVC 与 Swing 应用程序一起使用?

4

2 回答 2

7

Not really. As you say, Spring MVC (or Spring Web MVC) is primary targeted for web server development and thus have little to do with client side or standalone GUI applications.

That said, nothing prevents you from using ordinary Spring technologies for dependency injection, as a backend in your model, etc. Spring provides abstractions for persistence, remote network communication, transactions, security and so on that might come in handy in many projects.

Additionally, there is the Spring Rich Client Project that was released some years ago, but I do not know its current status.

于 2013-05-05T16:00:18.400 回答
3

不,但您可能想看看Griffon,它提供了基于 Spring 库和 Groovy 语言的 Swing MVC 框架,任何 Java 程序员都应该很容易上手。

我已经非常成功地使用它为企业客户构建了相当大的桌面应用程序。

于 2013-05-05T17:28:02.863 回答