使用 Spring IoC 配置 Netty

发布于 2025-01-04 23:27:08 字数 69 浏览 2 评论 0原文

有人用Spring配置Netty吗?

我正在寻找有关如何使用 Spring 配置 Netty 的示例或描述。

Has anyone used Spring to configure Netty?

I'm looking for an example or description on how I can configure Netty with Spring.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

攒眉千度 2025-01-11 23:27:08

是的,你可以。看下面用Netty编写的jet java游戏服务器,服务器都是使用配置的春天。看一下 server-beans.xmlnetty-本项目中的handlers.xml等可供参考。

要在 Spring Web 应用程序中配置 Netty,请查看以下链接
[更新]最近我也有博客关于使用仅 java 配置而不使用 xml 进行此操作。

Yes, you can. Look at the following jet java game server written in Netty, the servers are all configured using spring. Take a look at the server-beans.xml, netty-handlers.xml etc in this project for reference.

For configuring Netty within a spring web-app look at the following link.
[Update] Recently I have also blogged about doing it with a java only configuration using no xml.

酒浓于脸红 2025-01-11 23:27:08

Netty 仅使用简单的“pojos”,所以我认为这里没有问题。只需像往常一样创建您的 bean 定义即可

Well Netty use just simple "pojos" so I see no problem here. Just create your bean definations as usual

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文